It's obviously better to have a, say, 1% oversupply than a 1% undersupply, but that's not an interesting question to answer, really. The better question would be: is it better to have a 1% undersupply than a 15% oversupply? (Or some other larger and less obvious mismatch) It would be clearly bad to paperclip-optimize doctors -- everyone must go through all 10 years of post-secondary education to be a doctor and then after they have done so, we will be pick the best 3% of them to be practicing doctors while telling everyone else to find another career is incredibly wasteful, as is anything significantly in that vein.
It's rather meaningless to talk about oversupply or undersupply of doctors. Demand for healthcare services is effectively infinite. The problem is that we burn up most healthcare resources on treating preventable chronic diseases, and on futile end-of-life care.
Rather than on supplying more doctors we would probably get better results for society as a whole with more dieticians, personal trainers, and substance abuse counselors.