Supportive parents, significant others, and friends? The first wave of militant[1] feminists repeatedly reinforced that women were the equivalent of men in many ways and better in some[2]. Women today (under 40 or 50 years old) have had the benefit of hearing the same "you can do anything" message that parents have told their sons. Girls and women are supported socially when their MBA (which was the first professional non-library sciences, teaching, etc. that took off), JD, and MD. Mothers and Fathers are as proud of their daughters being excellent as they are of their sons.
Sure, there are religious, geographical, and socio-economic holdouts, but I think that this is one of the three big factors.
The second is that men tend to drop out to get jobs. If you can make $150k out of school with a BS EECS, why go to law or med school? Again, using my wife and her circle of female attorneys as examples, women seem to be more interested in personal satisfaction and are willing to pay a price for it, whether it's working in a rough environment (Kabul, Kosovo, Department of Homeland Security) or postponing that satisfaction by spending more time in school.
The third is that med and law school are great careers with a lot of opportunities for women who want to have children. Sure, there's partner track that will not necessarily be an option, but again, they don't always have the same "must be alpha" drive that men do. They can take a year off, maybe start back in a step behind, maybe work part time, but know that they can do the job they like, with variety in cases, until they decide to retire.
Of course, there are a bunch of contributory factors that I didn't cover and don't know how universal they are, but on the "sexist" side, it's still more acceptable for a woman to take time off and be supported by her husband than the other way around. You have exceptions, like ESR, so I don't think it's as influential.
Finally, they still put up with a lot of sexism, but they know it's wrong and that it is not a reflection on them, but on the morons trying to put them down. Not that it doesn't hurt, but sometimes hurt is a good motivator to succeed in spite of others.
[1] For want of a better word.
[2] Just as I am better at feats of strength than my wife, who works out 1-2x/daily, but she is better at doing the type of research necessary to be one of the best litigators most attorneys have seen.