You're just hand waving and haven't proposed any sort of viable specific solution. Customers aren't willing to pay higher bills for the sake of training residents. Those who have a choice will go to a cheaper, non-teaching hospital. Hence the free rider problem.
When the holiday rush comes around, does UPS pay to train new employees or do they just throw up their hands and say that it will now take a month to deliver a package? And how does UPS avoid its customers being not "willing to pay higher bills" for the sake of training new employees? And what stops Fedex from being a free rider that poaches the new UPS employees right after they're trained?
Your whole argument is just beating down criticism by taking the current broken incentives as if they're set in stone. Yes, we know the incentives of the current system are terrible. In fact that's exactly why the whole system needs to be overhauled with sweeping reforms, rather than waiting for it to get better on its own.
Why do you keep asking me for a solution, without agreeing with me on the problem at hand?
We dont even agree that residents drive up costs. I dont agree that is a given.
If we assume residents are a cost, the solution is still simple. you just attach the cost of training to the physicians salary. Then, whatever hospital they work at will have pay for the training.
Last, the residency program costs are tinny in comparison to overall physician costs. Back of the envelope math shows the 20 billion program is a few percent physician costs, which are themselves only a part of healthcare costs.