The cost of becoming an MD is astronomical. I have a nephew currently studying for it and he's looking at $500,000 in student loans. For a school in idaho of all places.
Part of the shortage is also because very few people can afford to become doctors.
Except for the DOE student loan programs just capped loans for med school to 200k lifetime so unless students are fairly wealthy, they're going to find it hard to become a doctor.