Air pollution remains a pervasive global threat, with far-reaching implications for both environmental sustainability and public health. While considerable research has examined the relationship between PM2.5 concentrations and their driving factors, the nonlinear contributions of these factors, especially across different urban contexts, remain insufficiently explored. This study seeks to bridge this gap by applying interpretable machine learning (XGBoost) to investigate the nonlinear impacts of meteorological, socio-economic, environmental, and architectural variables on PM10 and PM2.5 levels. Specifically, we aim to understand how these factors' contributions differ across three major urban agglomerations (UAs) in China. Our findings reveal notable spatial heterogeneity, with meteorological variables, such as temperature, AOD, and evapotranspiration playing a predominant role in the BTH region, while architectural factors have a more significant impact in the PRD, contributing more than 60%. In the YRD, increasing standard deviation of building height (SDBH) to 20-40m and average mean building height (MBH) to 15-20m are associated with lower PM10 concentrations. Notably, the impact of socio-economic activities on air pollution was also observed. For example, as NPP_VIIRS increased from 15 to 120, PM2.5 concentrations in the PRD region decreased from 14 mu g/m3 to 11.5 mu g/m3, a novel finding not previously highlighted in related studies. Furthermore, the relationship between GDP and PM2.5 concentrations follows a nonlinear pattern, initially rising and then declining, a pattern consistently observed across all UAs. Overall, this study underscores the spatial heterogeneity in the relationship between air pollutants and their driving factors, offering insights for region-specific pollution control strategies and broader global environmental management frameworks.