Actually, the Borg were based on the communists.
The economy of Star Trek is always left vague on purpose and dialogue about it is often contradictory. In one sentence someone says money doesn't exist, and yet in another episode, they clearly mention a pay grade based on rank. Gene Roddenberry had visualized a world where though various means (usually technology) people had solved problems such a hunger, disease, etc. However, it was never a perfect world, far from it. There were still evil people, numerous diseases still killed people, violence and crime were still common, and bad things happened on a regular basis.
In Deep Space Nine, it is clear that money still exists in numerous forms.
Other races which were introduced in TNG represent various types of governments that exist or have existed on Earth at one time or another, often overemphasizing their good or bad points. An example are the Ferengi who represent capitalism without any moral restraints, but quickly evolved into the show's comic relief. The Cardassians are the militarists that we saw in the early 20th Century until the end of WWII. The Romulans and Klingons existed before TNG so they do not have a specific counterpart in Earth history.
I've watched Star Trek since I was a kid, and never once saw it as some secret method to convert people to socialism. It's a TV show.