I'm inclined to believe that those jobs are equally as toxic towards men as to women. This is purely based on my personal experience, but to me it seems as though men just grow more used to the typical male-to-male bullshit (pardon the expression) while growing up, so they can more easily just deal with it. Also, consider that it isn't enough that women want those jobs, there needs to be lots of women who want those jobs. If the set of people who 1. want those jobs and 2. believe they are capable of achieving them contains less women, then the subset of those people who are good enough to get those jobs will also contain less women.
Now, combining the factors that 1. girls are often confronted with an image of men being good at the sciencey stuff and women being better at caring for a family and 2. to women it's much more viable to instead attempt to get married to a man with one such high-paying job\, it makes sense that less women would attempt to get into those positions.
\ And I am not trying to say that's something only women do, but something men would probably do just as much if it was available to them.