NIH has received almost $4.9 billion to date to fund important COVID-19 research on diagnostic tests, vaccines, and treatments. More than $940 million came from the Coronavirus Aid, Relief, and Economic Security (CARES) Act in March 2020, with supplemental funding coming from the U.S. Congress .
Edit: I guess that you could argue that it wasn't all for a single drug
> In this cross-sectional study of 356 drugs approved by the US Food and Drug Administration from 2010 to 2019, the NIH spent $1.44 billion per approval on basic or applied research for products with novel targets or $599 million per approval considering applications of basic research to multiple products. Spending from the NIH was not less than industry spending, with full costs of these investments calculated with comparable accounting.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10148199/
The industry might spend more overall, but if you look at typical drugs they are typically publicly funded.
Edit: I think the main point people miss is all the research done by universities that is government funded. MRNA vaccines were made possible by decades of university research based on public funding, the private corporations just came in and did the easy part at the end. Novel medicines are mostly based on such research and hence mostly publicly funded, we would continue to make such progress regardless of private investments.
This includes amortized spending for failed drugs I think, but so does pharma spending so seems like a fair comparison.