This study explores corn yield prediction using remote sensing technology. To overcome the limitations of existing process-based and machine learning models, we developed the KGML-SM model, which considers soil moisture as an intermediate variable, utilizing the Knowledge-Based Machine Learning (KGML) framework. To prevent overprediction in drought conditions, we designed a drought-aware loss function and experimentally demonstrated that the KGML-SM model outperforms other machine learning models. We analyzed the relationships among drought, soil moisture, and corn yield, providing interpretability of prediction errors and suggesting future directions for model improvement.