If it were brain gender stuff, you would see the U.S. engineering, math and science proportions played out across the globe. But that is not what is happening. My partner is in the tech field and he travels internationally a lot. China and india have female hard science folks and female engineers. Look at Russia under the USSR. Many women went into the hard sciences.
No I'm sorry, it is not brain stuff, It is society stuff. culture stuff. Additionally, young brains are very plastic. One reason you see the gender differences you do could be entirely the types of stimuli young brains are exposed to. Additionally, there is research suggesting that girls do just as well as boys in math until around 8th grade. That often coincides we girls spending less time in academic pursuits and more time in social activities.
I have tried my little bit, such as being a math and science teacher, to get girls more interested in science and get the whole system less sexist. What I learned is that society is really hard to change.
We lost a great female scientist this week. Sally Ride, who hosted science days for girls, was a true leader in the field.