This was the question addressed by the landmark 1910 Flexner Report from the Carnegie Foundation for the Advancement of Teaching. Back in the early 1900's, residency training did not exist yet, and students entered clinical practice immediately after graduation from medical school. The quality of medical training varied significantly with alarming deficiencies in many medical schools. An independent, nonprofessional organization was commissioned to report about the situation in order to pressure the public to reform medical school education.
This organization was the Carnegie Foundation for the Advancement of Teaching, led by Abraham Flexner. The result was the creation of laws that required physicians to have completed a defined set of educational experiences before starting their clinical practice.

Unlike in 1910, current trainees must now also complete residency training after medical school before entering clinical practice. If updated, the revised Flexner report would focus instead on graduate medical education (GME) instead of undergraduate medical education (UME).

So, how ready are our residents for the clinical practice of medicine today?
Unfortunately, not so ready.
The Institute of Medicine and various articles in JAMA have documented this. Their conclusions are that GME needs a significant overhaul so that graduating residents can consistently provide high-quality medical care of our country's citizens. Unfortunately (1) identifying the problem and (2) making recommendations for change doesn't magically make change happen. Many regulatory bodies are stuck in how they currently practice the business and management of GME. Traditions are understandably difficult to change.

On paper, the solution might seem easy. The Accreditation Council for Graduate Medical Education (ACGME), which oversees the accreditation of all GME training programs, should make an overarching top-down change. The decree- Make residency training better. But no, things can't be that easy. As it currently stands, the ACGME has given the individual RRCs (each represents a medical specialty) to come up with the specialty-specific training standards. I support this philosophy because EM physicians on the EM-RRC know the nuances of EM training more than a non-EM physician in the ACGME office. Unfortunately, this adds another layer of complexity and creates an impasse for a blanket change across specialties.
In the commentary, Dr. Whitcombe summarizes some proposed ideas. Several revolve around some form of licensure demonstrating competency (a.k.a. "stamp of approval") before graduating from residency.
My thoughts

I think the responsibility lies somewhere on the shoulders of the ACGME and individual RRCs.

Here's a crazy outside-the-box thought. If JAMA published several papers (see references below) documenting survey results that new practicing physicians feel inadequately trained in particular aspects of medicine, why can't we use these survey tools annually during residency training? We should be addressing and assessing clinical competency throughout residency and not just before they graduate. Each resident would perform a honest self-assessment of his/her competencies (or lack thereof) in various areas.

- Education is placed directly at odds with clinical service. For instance, a resident may need to do an elective in bedside ultrasonography. This may require pulling them off of an Emergency Department rotation. That leaves a gap in clinical coverage in the ED. This translates to more dollars needed by the department to ensure adequate clinical coverage. Asking for more money for the sake education is always a touchy subject.
- Because each resident has a customized personalized curriculum, lots of faculty and administrative time will be needed to ensure each resident's success. This is a resource-intensive endeavor.
- This is an operational and scheduling nightmare.
Reference
Whitcomb ME. Flexner redux 2010: Graduate medical education in the United States. Academic Medicine. 2009; 84:1476-8.
JAMA references
Wiest FC, Ferris TG, Gokhale M, et al. Preparedness of internal medicine and family practice residents for treating common conditions. JAMA. 2002;288:2609 –2614.
Blumenthal D, Gokhale M, Campbell EG, Weissman JS. Preparedness for practice. Reports of graduating residents at academic health centers. JAMA. 2001;286:1027–1034.
Cantor JC, Baker LC, Hughes RG. Preparedness for practice: Young physicians views of their professional education. JAMA. 1993;270:1035–1040.