both are incredible schools. stanford is very research-oriented. UCSF has a great curriculum, teaching, and most likely better clinical training. if you want to be a research scientist go to stanford, otherwise UCSF (if you are lucky enough to get into both). if you are lucky/skilled enough to get into both or UCSF only (my dream school that rejected me) i will be INTENSELY jealous but will acknowledge you know as my leader.
you really can pick 'em.....good luck. even those with great scores and grades are definitely not locks for these schools. if you are really committed to being a doctor (and no offense here at all) you might have to expand your list of schools.