Air pollution poses a persuasive threat to global health, demonstrating widespread detrimental effects on populations worldwide. Exposure to pollutants, notably particulate matter with a diameter of 2.5 µm (PM2.5), has been unequivocally linked to a spectrum of adverse health outcomes. A nuanced understanding of the relationship between them is crucial for implementing effective policies. This study employs a comprehensive investigation, utilizing the extended health production function framework alongside the system generalized method of moments (SGMM) technique, to scrutinize the interplay between air pollution and health outcomes. Focusing on a panel of the top twenty polluted nations from 2000 to 2021, the findings yield substantial insights. Notably, PM2.5 concentration emerges as a significant factor, correlating with a reduction in life expectancy by 3.69 years and an increase in infant mortality rates by 0.294%. Urbanization is found to increase life expectancy by 0.083 years while concurrently decreasing infant mortality rates by 0.00022%. An increase in real per capita gross domestic product corresponds with an improvement in life expectancy by 0.21 years and a decrease in infant mortality rates by 0.00065%. Similarly, an elevated school enrollment rate is associated with a rise in life expectancy by 0.17 years and a decline in infant mortality rates by 0.00032%. However, a higher population growth rate is found to modestly decrease life expectancy by 0.019 years and slightly elevate infant mortality rates by 0.000016%. The analysis reveals that per capita greenhouse gas emissions exert a negative impact, diminishing life expectancy by 0.486 years and elevating infant mortality rates by 0.00061%, while per capita energy consumption marginally reduces life expectancy by 0.026 years and increases infant mortality rates by 0.00004%. Additionally, economic volatility shock presents a notable decrement in life expectancy by 0.041 years and an increase in infant mortality rates by 0.000045%, with inflationary shock further exacerbating adverse health outcomes by lowering life expectancy by 0.70 years and elevating infant mortality rates by 0.00025%. Moreover, the study scrutinizes the role of institutional quality, revealing a constructive impact on health outcomes. Specifically, the institutional quality index is associated with an increase in life expectancy by 0.66% and a decrease in infant mortality rates by 0.0006%. Extending the analysis to examine the nuanced dimensions of institutional quality, the findings discern that economic institutions wield a notably stronger positive influence on health outcomes compared to political and institutional governance indices. Finally, the results underscore the pivotal moderating role of institutional quality in mitigating the deleterious impact of PM2.5 concentration on health outcomes, counterbalancing the influence of external shocks, and improving the relationships between explanatory variables and health outcome indicators. These findings offer critical insights for guiding evidence-based policy implications, with a focus on fostering resilient, sustainable, and health-conscious societies.