But besides that, the Gates Foundation has decided that the most effective way to spend its money, dollar-for-dollar, is on efforts like polio eradication and malaria research. You'd have to convince them that this would be the most worthwhile use of their money - and quite frankly, if I were in their shoes, I wouldn't. Even if lowering the costs of healthcare in the US were their explicit goal (it's not), it would be a rather inefficient way to go about it. And eradicating infectious diseases that largely affect the poor is a much bigger win for humanity than an ongoing subsidy[0] for medical care in the developed world.
[0] This would require perpetual funding for it to be effective; as soon as they decided to stop funding residency programs, we'd go back to the status quo.
What if the Gates Foundation decided it wanted to fund 1 residency position? Is there some structural roadblock in the way of its money?