The unchecked growth of urban populations has spurred rapid and unsustainable urban expansion, exacerbating environmental degradation both locally and globally. This research offers a comprehensive analysis of the Urban Heat Island (UHI) phenomenon in Bangalore and Hyderabad, India, focusing on its spatial and temporal distribution and its correlation with air pollutants. Conducted over the course of summer and winter seasons from 2001 to 2021, this study advances our understanding of UHI dynamics in rapidly urbanizing regions, shedding light on the complex interplay between urbanization, climate, and air quality. The primary objective of this study is to assess and compare the predictive performance of baseline Random Forest (RF) and Extreme Gradient Boosting (XGBoost) models for forecasting Land Surface Temperature (LST) in Hyderabad, India, while examining the impact of integrating spatial information into these models. Incorporating an extensive array of input variables, ranging from spectral indices to terrain features, land use/land cover (LULC) data, atmospheric parameters, and spatial data, the analysis reveals significant relationships between LST and various factors. Notably, Aerosol Optical Depth (AOD) and Normalized Difference Built-up Index (NDBI) exhibit strong positive correlations with LST, while Enhanced Vegetation Index (EVI) demonstrates a pronounced negative correlation. Similarly, Modified Normalized Difference Water Index (MNDWI) displays the strongest positive correlation with LST (r = 0.49), whereas EVI exhibits the most notable negative correlation (r = −0.67). Additionally, Modified Bare Soil Index (MBI) demonstrates a noteworthy negative correlation (r = −0.48) with LST for Bangalore. Atmospheric components such as CO, NO2, and O3 also show significant positive correlations with LST, with NO2 displaying the highest correlation during winter in urban areas. XGBoost emerges as the superior model, achieving high R2 values of 0.84 for Bangalore and 0.88 for Hyderabad. Integration of spatial information consistently enhances the performance of both RF and XGBoost models, resulting in reduced Mean Squared Error (MSE) and Root Mean Squared Error (RMSE) values. However, predictions over water bodies tend to be underestimated. The study underscores the importance of incorporating spatial data for accurate LST prediction, with implications for environmental monitoring and management. Despite the advancements made, further research is needed to elucidate the specific mechanisms through which spatial information improves model performance, suggesting avenues for future investigation and refinement of modeling methodologies. At the intersection of rapid urban growth and environmental conservation, these findings are poised to inform policymakers, urban planners, and researchers, guiding them towards innovative and sustainable urban development strategies aimed at mitigating the adverse impacts of rapid urban expansion while promoting ecosystem well-being. The study contributes to spatial modeling strategies and refines LST prediction methodologies, offering valuable insights for addressing the challenges posed by urbanization and climate change in rapidly urbanizing regions.