You seem to be contradicting yourself, you confidently say this:
If there's no such thing as male and female brains, why are the vast majority of engineers men? Why aren't there more female mathematicians? Of course, individual women can make top engineers and mathematicians, but there are far fewer of them at the population level than there are male ones.
Men and women behave so differently and have such different preferences that I can never understand why people try to deny there are sex differences in the brain. At least in general, even if it doesn't apply to every individual. Many parents who have raised both a boy and a girl end up convinced of such.
And when people come back and point out to you the reasons why there weren't/aren't more women engineers and mathematicians and posters come back and show you why and why those there were/are are not more known about you come back with this:
I do think that sexism has something to do with it. And what your physics teacher said is terrible. Like I said before, as individuals women can absolutely have fine STEM brains. Bletchley Park and the stories in Hidden Figures are examples.
But if females as a population were just as inclined towards STEM as males, I don't think there would be such a huge disparity in the numbers. I do think that sexism has something to do with it, but I don't think it explains the massive differences. IMHO, it's odd to see such a disparity without some biological underpinning to it.
Patriarchy, misogyny, sexism and indeed social class has everything to do with it.
But perhaps I am wrong. Those are just my thoughts, and I'm not a scientist or a researcher in the field.
Yes you are wrong.
I'm good at arts and humanities and not good at maths and science. I don't think that that makes my brain lesser at all. I have much better spelling ability and writing ability than most people I've met who are good at STEM. And I find it easier to empathise, as well. Many people I know who are engineers seem to be somewhat robotic and clueless when it comes to emotions. STEM brains are not better than non-STEM brains. They have different areas of strengths and weaknesses.
My mother-in-law had a phenomenal mathematical brain. What could she have done with that if she hadn't been forced to leave school at 14 and go into the prescribed female sphere of work relevant to her social class? My father-in-law had a phenomenal arts/classics brain, academically very gifted but he too had to leave school at 14 and go to work in a manual field as that was what men of his social class did. Both of them showed their true potential during the war but were of course side-lined afterwards. Neither were unempathetic, far from it and both would knock most people into a cocked hat with their spelling and writing ability.
That is 100% factual, not a mere generalisation.
Sexism is the reason that, say, a STEM degree is valued higher than a humanities degree by many.
And why do you think that is?