To become a doctor, you do need to get an undergrad degree. Although most medical schools do not demand a specific major to get admitted, they all require certain amount of Biology, Chemistry, Physics and Math courses to qualify. You do need to also take MCAT exam during your final years of college to be eligible to apply for Medical school.
Considering this, although any major is good enough, you want to probably stay in the Stem fields. Most do take Bio or Chem major typically.
Once you are in Medical college and studying you can probably sped additional time focusing on Pediatrics or research on Pediatrics to become better eligible and land a residency program in pediatrics. It is not automatic. You have to work towards it and hope the complex residency program assignment algorithms work in your favor and you become lucky!
I know all this because my daughter is a medical student and she is actually working towards a Pediatrics Neurology Residency. She did Bio major in undergrad. Hope and wish she gets it. And best wishes to you as well.