it depends on which moments in history we are talking about. if recent history (e.g. 1990's - 2005 ish), I'd probably say yes for academia, possibly less so for other sectors of the economy.
I started my PhD in the US in 2015, as did my friends. One of my (female) friends went to the top or second best university in the world for her very maths-heavy, male-dominated field. She was in an almost all-male lab and had a pretty good time within the lab. She also had friends (women) who went to other labs in that university, and to the only other university which could compete with hers in that field. Here is some of what she learnt:
Her friend who went to another lab in that university, realised after a while that not just was she the only woman there, but that there were very few female lab alumni. Later, she learnt that her professor used to have an only-male policy, but had since become enlightened - he now allowed East Asian women (like her) in the lab, because they were more innately capable of dealing with the maths needed. She considered launching a complaint about what she perceived as sexual and racial bias, but decided to prioritise getting her PhD, put her head down, and graduated. She learnt that previous East Asian female graduates from the lab had learnt the same thing and made the same decision, because, if a complaint was made, it would at best mean a one- or two-year investigation during which time their work was stalled, and then re-starting a fresh project in a different lab with a hostile new PI.
To the best of our knowledge, the professor continues in his enlightened ways.
At the other university was a senior professor in that field. He was the mentor of my friend's advisor. His lab graduates are also over overwhelmingly male. He shared that other professor's view on the unsuitability of women to the field, though he started taking in a handful of female PhD students towards the end of his life. However, it can not be said that he always kept women out. He offered female students a chance to be TAs for his courses, as long as they met the criteria he openly demanded - attractiveness.
This was a man whose academic tree shows his students - all male- have become professors within this field at virtually every university in the US.
Once again, this was 2015-2021.
In pretty much every university I've ever seen or been a part of this, any form of harassment is strictly forbidden and harshly punished (except harassment of conservatives, which is often tolerated even if forbidden by the letter of the policy law).
The only time during my PhD I saw someone censured for political opinion, was during a retreat when a senior PhD student (female) called a new student (male) a moron for agreeing with Jordan Peterson. She was made to apologise to him next day.
The only time I saw a trigger warning in a course I TA'd was for a video on evolution, part of which made fun of Intelligent Design people. Students were allowed to skip the class where the video was shown.
Why is all this the case? First, I think the male/female differences are largely domain specific, and probably driven by motivational differences with women finding some fields inherently less attractive and some inherently more attractive (much like the vast majority of wikipedia content providers, uber drivers and football fans tend to be male, despite these being open opportunities to anyone who might want to participate).
So is at all merit based (question 1)? For male/female, basically yes. Discrencies occur due to motivational factors (which may result from genetics or society). There are also certain cultures that may be simply be more off putting to women, such as philosophy which is very argumentative and aggressive. I don't think the discrepancies are due to hiring biases against women though. For race, I also don't think the discrepancies are due to hiring biases. If anything, departments are hungry to hire more and more ethnic minorities (except asians who probably are truly discriminated against, if anything because they perform too well) due to political and reputational pressures amongst colleagues. The problem is the lack of qualified candidates to meet the demand.
That's certainly a plausible theory.
Along the same lines, do you think the under-representation of conservatives in academia is because conservative traits* are badly correlated with traits valued in academia? There is
some evidence from the US showing a positive correlation between IQ and leftist beliefs - perhaps conservative under-representation is a downstream effect of their deficient cognitive abilities? There is slightly more
convincing evidence showing the correlation of conservatism with authoritarian thinking - perhaps conservatives aren't able to function well within groups, and this explains why they are missing from academia? Or perhaps conservatism is just badly correlated with interest in academia?
*which are genetic, as much as interest in science, or IQ, is genetic.
Now I personally don't think these IQ/EA GWASs are capturing particularly useful information, and some other behavioural GWASs are even worse, and I'm skeptical about how "innate" these things are. But if genetics cannot be ruled out for the under-representation of women and minorities, I don't see why it should be ruled out for the under-representation of conservatives.
To put my cards on the table -
I'm an non-US citizen South Asian male in US academia. To get into undergrad college within India, I had to face a sharper form of affirmative action, called reservation, which meant I had to compete for half the total available seats. (I managed to get in). Within the US, by not being a citizen, not being a woman, and not being a US-born under-represented minority, there are virtually no fellowships and grants I can apply for. As a result, my chances of getting a faculty job are reduced (fake numbers coming up) from 0.1% to 0.01%. I enjoy some racist and sexist podcasts, that would get me reprimanded if I accidentally played it aloud in the lab.
At the same time, the most sweeping censorship I've seen within universities in my 10 years here has been around Israel. Professors have lost tenure over it, while professors like those I described, or those saying that Black inferiority is genetic, retain their tenured positions. Lower down, dozens of postdocs and grad students have lost their jobs, and hundreds of undergrads have been suspended, all for very particular *left-wing* speech. The Israel exception to free speech was true before Oct 7, and has been enlarged since, and is now reinforced by the power of the right-wing federal government.