As urbanization accelerates, the land use/land cover (LULC) changes significantly impact land surface temperature (LST) and urban heat island effect (UHI). Urban green spaces play a crucial role in regulating the urban thermal environment, typically characterized by the normalized difference vegetation index (NDVI). This study utilizes remote sensing data from Shanghai spanning 2000–2024, combined with the CatBoost model and SHAP method to characterize the nonlinear marginal effects of NDVI on LST and its spatial heterogeneity across different LULC types. The research findings reveal that the regulatory effect of NDVI on LST exhibits significant variations across different land types, demonstrating nonlinear and threshold characteristics. Built-up land types show the strongest cooling sensitivity within the NDVI range of 0.15–0.35, while vegetation land types exhibit saturated regulatory effects with diminishing marginal returns. Water bodies maintain stable negative regulation characteristics, showing insensitivity to NDVI changes. Other land types demonstrate higher uncertainty. Additionally, this study simulates two scenarios to predict LST changes under different LULC–NDVI combinations. The simulation results further validate the significant benefits of enhancing urban green space in built-up areas for mitigating the urban heat island effect, emphasizing that future green infrastructure planning should focus on areas with low green coverage while optimizing the spatial structure of high-vegetation areas. This study provides quantitative evidence to support the achievement of SDG 13 climate action goals and offers guidance for urban green planning and climate adaptation policies.