Studying historical changes in the 2.5 μm particulate matter concentration (PM2.5) can clarify the relationship between air pollution and socioeconomic development. Daily PM2.5 levels and meteorological data (2012–2022) for three large cities (Beijing, Shanghai, and Xi'an) at different development stages in different regions of China were used to construct a random forest (RF) model for estimating historical PM2.5 data for the period 1973–2011, a time period in which few measurements were made. The eigenvalue for visibility was the largest in the RF model; visibility explained 0.76–0.87 of the variance in PM2.5 for the three cities. The daily estimated PM2.5 was validated, with an R2 of 0.654–0.780 and average absolute error of 11.52–31.73 μg m−3 in the model. PM2.5 concentrations predicted by the RF model for 2004–2011 were highly correlated with gravimetric measurements (R = 0.585, p < 0.01). We extensively validated the results of RF using manual weighing PM2.5 data, online monitoring concentration of PM10, and aerosol optical depth (AOD), demonstrating the accuracy of the model. Over the study period, the PM2.5 level first increased and then decreased in the three cities; however, the year at which the trend changed differed. We further explored the effects of urbanization and economic growth on PM2.5 levels by investigating the correlations between socioeconomic indicators and PM2.5. The magnitude of the permanent population of Beijing and gross regional production growth in Shanghai were both significantly positively correlated with the PM2.5 level. Increasing the size of urban green areas can reduce PM2.5; this effect was strongest for the southern city of Shanghai, may due to their different climates and green tree species. Energy consumption and emissions from primary industries were strongly positively correlated with the urban PM2.5 level. An in-depth understanding of the factors affecting PM2.5 concentrations could help policymakers improve air quality management strategies, especially for densely populated megacities.