Accurate recognition of coal-rock properties (CRPs) while drilling is a critical prerequisite for ensuring the intelligent control and stable operation of antipunching drilling robot. The primary challenges in industrial applications are potential safety hazards and single drilling mode in coal mine roadways, resulting in samples with insufficient number, unbalanced distribution, and background interference. However, most current CRPs recognition methods rely on sufficient and balanced samples, limiting their application efficiency and scope. To this end, we propose a selective kernel transformer with model-data fusion loss (SKformer-MFL) model with data correction, which generates simulated signals via electromagnetic simulation model to assist the CRPs recognition while drilling under limited samples. First, a coal-rock drilling model based on electromagnetic simulation is established to generate simulated signals as the primary part of training samples. Then, the simulated signals are corrected using denoising diffusion probabilistic model improved with vector-quantized variational autoencoder to minimize the feature discrepancies between simulated and real signals. Finally, the corrected high-fidelity signals are used to train the proposed SKformer-MFL model, where a novel loss is built to handle the imbalanced training dataset through an adaptive weighting mechanism. This model can simultaneously capture long-range correlated features and local mutation multiscale features of the input signals, thereby improving the model’s recognition capability and generalization performance. The experimental results indicate that the proposed method can produce high-fidelity electromagnetic simulation signals and achieve excellent recognition performance for CRPs while drilling under limited samples.