At my previous university a professor from a nearby medical school came and gave a talk to the engineering students. She said a lot of engineers transferred to medical school!
The professor explained that while we were at school calculating water flow in a pipe, medical students were calculating blood flow through a vein. She gave other examples and said that their program was looking for more engineering students to apply!
My suggestion is, since you have an idea of what you want to study, continue learning what will help you the most in that dream job. At the same time, don’t be afraid to take other classes! You might find something you like better or get new ideas to make you a better pediatrician!