For med school, it's 4 years undergraduate (pre-med) and 4 years of medical school. Once you start doing your residencies, you already have an MD, and are just learning your specialty.
For a physics major, it depends on what you plan to do with it and how far you want to take your education. 4 years undergraduate, and you'll graduate with a B.A. or B.S. You can then decide if you want to go out and get a job (not sure what you can do with a B.S. in physics that's related to physics; someone else here will have to fill in that information), or you can go on to graduate school to get a M.S. and/or Ph.D. For physics, that's probably a minimum of 6 more years of education, but PhD programs are completely individualized beyond the basic coursework, so it could be longer or shorter depending on how well your research works out.