Both are great for pre-med. Penn’s humanities departments are stronger on the whole so if you are looking for the best professors in fields that span your premed requirements AND english, history, economics , etc. then Penn is a better choice. Additionally, as Penn95 said, you’ll have access to all of Penn’s graduate/professional schools as well as the other undergrad schools and research institutes on campus to add to your education as well. So you can do research with professors at Penn Med, CHOP, the Wistar Institute, etc. while fulfilling your pre-med requirements and taking classes in Penn’s many wonderful departments.
As for safety, Baltimore and Hopkins are improving but they’re not quite there yet. JHU has actually modeled its neighborhood improvement plans on those that were extremely successful for Penn:
""Where Hopkins is now, Penn was, say, in 1996,” says Anthony Sorrentino, assistant vice-president in the office of the executive vice-president at Penn.
He adds that 20 years ago “urban decay had enveloped our campus and West Philadelphia was embattled, [by] violent crime, blight, low educational attainment in the public schools, the general decay that comes with the white flight…for the country and the suburbs”."
https://www.timeshighereducation.com/features/university-as-pillar-of-community#survey-answer
That being said, Baltimore, like most east coast urban centers, is on the rise! Don’t underestimate the power of an exceptional university like JHU to change the city very, very quickly. And as it is now, students seem plenty happy and safe on the JHU campus so if you really prefer it over Penn, I wouldn’t be too fearful of attending.
Feel free to check out my other posts about Penn for more info and I’m always happy to answer any questions you might have! Good luck