In India, your major is largely determine by your academic results and social pressure when you finish up secondary schools.
If you score at the top in your entrance exams, you will applying to medical or engineering schools. The good schools are hyper selective and only take the top scorers (at a rate more selective than our ivy's). Very, very few people consider majors outside of these areas. Secondly, there is a huge amount of social pressure to be an engineer or doctor. It is quite often that parents choose your major, or at least heavily push their kids into one. There are lots of Bollywood movies whose plots are centered around parents forcing their kids into engineering.
Since your choice of major is largely determined by academic and social reasons there isn't a big gender disparity. Females do just as well on the entrance exams, and there is no societal view that engineering is a male major. If you are a parent who wants your kids to earn well and marry well, you will push your kids towards medicine or engineering regardless of gender. If you are female who scored well and got entrance into a top engineering school, dropping out would be unthinkable. It would be an insult to your family. You would be throwing away years of hard work in their view; some kids start preparing for entrance exams when the hit 14. There is even a suicide problem when people fail out of the top schools (see the movie 3 Idiots). Essentially majors and careers have a hierarchy which is the same regardless of gender.
As to why there isn't a societal bias that engineering is a male major, I'm not sure. It was definitely a quick change as it was only in the 1960s when most engineering colleges started admitting females.
There is definitely still a gender gap (many women are not supported to even finish basic schooling), but there isn't a huge societal bias that engineering major or STEM is a male profession.
I have heard that some of the USSR countries (Russia, Ukraine) have a similar culture and don't view engineering or STEM as "male" majors.
Maybe the problem is parents don't bully their daughters and sons into engineering here :)