If socialist globalism had truly created a utopian future where there was no more racism, etc. then why are almost all of the crew members of TOS and its' spinoffs literal ethnic stereotypes -- Scotty, Chekov, Uhura, Sulu, Picard, Crusher, Archer, etc. and as you stated the folks in charge are most often white males with females usually in caretaker roles?
If globalism had truly worked, then how would it be that a guy from Aberdeen would still be pasty white, with a thick Scottish accent, be fond of stereotypically Scottish drink and cuisine, and work at a stereotypically Scottish job?
If socialist globalism had done such wonderful things, then most if not all of the characters would be mixed race and adherence to a single stereotypical culture would be the exception rather than the rule.
What you're talking about is globalism and fascism which is basically the reverse of what Star Trek and even TOS from the very foundation was all about.
Star Trek (TOS and the rest) is a show (among other things) about personal freedom and diversity.
We see wildly different human personalities and aliens working together under the Federation. Hitler didn't win so we have in Europe and on earth many different languages (scottish, swahili, english) and cultures all living together in harmony, because with the advances of science like replicators and medicine we don't need to fight over resources or be materialistic/greedy/power hungry about it.
Same thing on the Starship. While there's still conflicts with many evil alien (most of the time they don't support freedom and the live and let live mentality) and divergences of opinion among the crew; The Starship and the Federation is full of different humans and aliens working together. This is the foundation of Star Trek right from the beginning. Diversity of languages, nationalities, clothing styles, philosophy, food, music, opinions, political parties, cultures, sub-cultures, etc, provides choices and is the foundation of freedom.
What is more optimistic in Star Trek than the usual dystopian future presented in Sci-fi is that it posit that science can lead to a better world. Specifically a world (earth) with no material needs and great advances in medicine. I always imagine the future of Star Trek as a future where everybody on earth would have access to replicators. You can build replicators with replicators. So you can build food, car, houses, star-ship, everything by mixing in the correct order the fundamental particles of the universe using any matter as a source of energy and input (since fundamentally all matters is the same:electrons, protons, neutrons or their constituents mixed together). So if everybody has food and all the resources they want. There's no need for war to fight oppression (or whatever you accuse the enemy of) since there's no real reason to be greedy or power hungry in the first place. We all have access to material resources (food, water, houses, robots, technology) and even holodecks.
This is contrary to most sci-fi features where science and the future can lead to a nuclear holocaust, an oppressive 'government/world led by corporations' restricting personal freedom, post apocalyptic world with people fighting over oil and water, a war against android built by us, a central internet like computer controlling all aspect of our lives, etc. They play on our fear of science and the future. Those features are meant as a warning of things to avoid and they make more dramatic stories for sci-fi and action-adventure series.
So in the Star Trek future. For humanity, science lead to better things. It's not a dystopian future. Specifically, a less materialistic world with no hunger (or even money in that case). Maybe the universal translator helps with languages. Then, of course, for dramatic purpose, we meet many evil beings and face many different dangers and challenges. Which form the main focus of the show. It's humanity vs the universe. The optimistic outlook for humanity is not the main focus of Star Trek. The focus is the more dramatic and dangerous exploration of space and the universe.