The problem with relying on billionaires isn't that they won't do it, it's that they don't actually have that much money. Gates with ~$90B is #2 in the world, but spending every cent of it all in the same year would amount to less than one half of one percent of US GDP. His entire fortune is not quite half of what the US spends on just advertising each year.
something something tax avoidance
Moreover, most of the things traditionally thought of as tax avoidance don't involve charities at all and are more along the lines of warehousing wealth in offshore companies where it can collect interest at low/zero tax rates.
You can't just throw money at something and expect hordes of highly talented and qualified people to suddenly be available to do it.
This isn't Bill's fault (as much as I'd like to blame him for something after suffering with Windows 9x), it's a product of our society. We don't value that kind of work, we don't demand our government to fund it properly (since the "free market" isn't going to), so we get kids going into college tracks where they can be good at online advertising rather than curing cancer.
This is far too simplistic. Throw a bunch of money at advertising and everyone goes to work for FAANG. Shift some of that money to disease research and suddenly people - who might have otherwise become doctors or followed a career path that paid - start realizing its a valid career path that they don’t need to sacrifice quality of life to pursue.
Yes, it’s not something that will happen overnight (it’s not like everyone immediately switched to coding once FAANG started paying a lot), but if the money is there, it will start to happen.
You can't take a CS degree and start working in disease research, any more than you can get an MBA and start in disease research. The time to get people on that track is when they're coming out of high school.
You can't take doctors and have them work in disease research either. They'll have the necessary undergrad work most likely, but all the med school stuff just isn't useful for it, and they'll have to start over with the postdoc studies to specialize in that research. After they've already invested a fortune in med school, they're not going to do that. Who's going to pay all these people to move away from more lucrative fields into research?