Background: The COVID-19 pandemic highlighted gaps in health surveillance systems, disease prevention, and treatment globally. Among the many factors that might have led to these gaps is the issue of the financing of national health systems, especially in low-income and middle-income countries (LMICs), as well as a robust global system for pandemic preparedness. We aimed to provide a comparative assessment of global health spending at the onset of the pandemic; characterise the amount of development assistance for pandemic preparedness and response disbursed in the first 2 years of the COVID-19 pandemic; and examine expectations for future health spending and put into context the expected need for investment in pandemic preparedness. Methods: In this analysis of global health spending between 1990 and 2021, and prediction from 2021 to 2026, we estimated four sources of health spending: development assistance for health (DAH), government spending, out-of-pocket spending, and prepaid private spending across 204 countries and territories. We used the Organisation for Economic Co-operation and Development (OECD)'s Creditor Reporting System (CRS) and the WHO Global Health Expenditure Database (GHED) to estimate spending. We estimated development assistance for general health, COVID-19 response, and pandemic preparedness and response using a keyword search. Health spending estimates were combined with estimates of resources needed for pandemic prevention and preparedness to analyse future health spending patterns, relative to need. Findings: In 2019, at the onset of the COVID-19 pandemic, US$9·2 trillion (95% uncertainty interval [UI] 9·1–9·3) was spent on health worldwide. We found great disparities in the amount of resources devoted to health, with high-income countries spending $7·3 trillion (95% UI 7·2–7·4) in 2019; 293·7 times the $24·8 billion (95% UI 24·3–25·3) spent by low-income countries in 2019. That same year, $43·1 billion in development assistance was provided to maintain or improve health. The pandemic led to an unprecedented increase in development assistance targeted towards health; in 2020 and 2021, $1·8 billion in DAH contributions was provided towards pandemic preparedness in LMICs, and $37·8 billion was provided for the health-related COVID-19 response. Although the support for pandemic preparedness is 12·2% of the recommended target by the High-Level Independent Panel (HLIP), the support provided for the health-related COVID-19 response is 252·2% of the recommended target. Additionally, projected spending estimates suggest that between 2022 and 2026, governments in 17 (95% UI 11–21) of the 137 LMICs will observe an increase in national government health spending equivalent to an addition of 1% of GDP, as recommended by the HLIP. Interpretation: There was an unprecedented scale-up in DAH in 2020 and 2021. We have a unique opportunity at this time to sustain funding for crucial global health functions, including pandemic preparedness. However, historical patterns of underfunding of pandemic preparedness suggest that deliberate effort must be made to ensure funding is maintained. Funding: Bill & Melinda Gates Foundation.