They can easily produce enough doctors, they just don't. A couple of reasons for this: schools inflate the amount of education required so they they can make more money and doctors go along with it (and a crazy amount of licensing requirements) to prop wages up by keeping the supply of doctors artificially low.
You could be an ICU nurse with 20+ years of experiences. Want to make a jumpt to becoming a doctor? You have to start ALL the way from the beginning of med school as if you an 23 year-old humanities major who decided to go to med school. Your 2 decades of hands-on medical experience counts for exactly nothing in the eyes of medical schools and certification boards. Does anyone really believe this is a good way to run things?
Fix the low pay and terrible conditions and yeah, you'll easily produce enough doctors and teachers, but late-stage capitalism isn't going to do that...
If the UK where to offer doctors the best pay and working conditions in the world, it could fix the UK doctor shortage, but only by 'stealing' doctors from other countries and making their situation even worse. To the best of my knowledge there aren't many empty slots at UK medical schools due to no one wanting to be doctors.
It's 'easy' for any one richer country to fix their problems simply by outspending and buying up resources from a 'poorer' country (in fact some people claim the UK's problems are due to other countries buying up all the UK doctors and nurses), but that doesn't solve the global problem
Also underfunded and treated shabbily (like all the educational establishments in the UK.) I should have been clearer, I suppose, and said that just improving conditions for the existing doctors and teachers is a stopgap, what's actually needed is a burning out of the hideous policies of the last 12 years and a solid return to a more socialist approach to government.