This study presents the determinants of childhood stunting as the consequence of child malnutrition. We checked two groups of factors—the socio-economic situation and climate vulnerability—using disaggregated sub-regional data in the spatial context. Data related to the percentage of stunted children in Pakistan for 2017 were retrieved from MICS 2017-18 along with other features. We used three quantitative models: ordinary least squares regression (OLS) to examine the linear relationships among the selected features, spatial regression (SDEM) to identify and capture the spatial spillover effect, and the Extreme Gradient Boosting machine learning algorithm (XGBoost) to analyse the importance of spatial lag and generate predictions. The results showed a high degree of spatial clustering in childhood stunting at the sub-regional level. We found that a 1 percentage point (p.p.) increase in multi-dimensional poverty may translate into a 0.18 p.p. increase in childhood stunting. Furthermore, high climate vulnerability and common marriages before age 15 each exacerbated childhood stunting by another 1 p.p. On the contrary, high female literacy and their high exposure to mass media, together with low climate vulnerability, may reduce childhood stunting. Model diagnostics showed that the SDEM outperformed the OLS model, as AICOLS = 766 > AICSDEM = 760. Furthermore, XGBoost generated the most accurate predictions in comparison to OLS and SDEM, having the lowest root-mean-square error (RMSE).