You're asking a very complicated question, and the answer can change at any time depending on the administration's wishes.
First, in the US you (mostly) can't go directly from high school to medicine. You need to first do a 4 year college program. There's no specific degree you need to get, there are pre-requisites for medical school including the basic sciences (Biology, chemistry, and physics) and usually some math requirements. Then, getting into medical school requires that the student do well in college, score well on the MCAT exam, and otherwise meet criteria to get admitted which varies by school. This usually requires volunteering, shadowing physicians, and sometimes research.
Which leads to the first hurdle -- getting into college on an H4. There are several challenges. First, your daughter will be considered an international applicant. Schools treat international applicants differently and often have a limited number of spots available. Second, students on H4 do not qualify for educational loans. Paying for college (and medical school) will require private loans (which can be very difficult to get and/or very expensive), scholarships (many of which may not be open to international applicants), or just plain family wealth. H4 students usually cannot work at all (*** See below for exception), so any type of work/study is out. Many colleges see their international applicants as good sources of tuition as they often pay full price in cash.
Assuming that all goes well, then your daughter would need to get into medical school. All the same problems apply -- international student, lack of loans, no employment, etc. Only a few medical schools consider international applicants at all.
If all of that happens, then after medical school comes a medical residency. This is a job -- you get paid, don't pay tuition. But, again, H4 students usually can't work. So, your daughter would now likely need her own H1b visa. At present, these cost $100K per visa, and it's highly unlikely any program would be willing to pay that. She would not qualify for an F1/OPT visa, nor a J visa (the other types of work visas that residents might be on).
Of course, lots of things could change over time:
* If the person with the H1b loses their job, the H4 evaporates. They might be able to switch to a student visa, or might just get terminated.
* If the person with the H1b is in the process of getting a green card, then the H4 holder can get an EAD and work on the H4.
* The H4 holder might be able to switch to an F-1 student visa. This seems possible, and if so opens more options. In fact, it appears that a child can only be on an H1 until age 21, so once they are over that they will need a new visa status.
* The rules about H or J visas could change at any time, for the better or worse.