I think Dune actually has some form of class consciousness. The hero saves an oppressed community who live being economically exploited by a corrupt empire that exploits their natural resources. It also ties in ecology as well with the transformation of planet dune into a hospitable planet. It's worth noting that Frank Herbert was brutally anticommunist too. You don't get this type of class consciousness in Star wars at all.
Expanse( I've only seen season 1 so far) is interesting (in ways that most Syfy shit isn't) in the sense that it perfectly encapsulates these themes and manages to be a bit more politically relevant too.
Other Sci-fi:
Star Trek - Mostly boring
Babylon 5 - Liberal historical materialism.
enjoyable and pretty good, No class consciousness ( a few episodes here and there deal with Unions and economic inequality on earth and mars)
Firefly - Typical Joss Whedon fanfare. Could've been great but not much happens in season 1.
Farscape - Love letter to the old style of sci fi serials (buck rogers) and star wars. Enjoyable but is average most of the time.
Lexx - Very cheesy and has very low view of Scifi. Season 3 is aesthetically and narratively interesting. Season 4 is quite the cringefest.
Lost - I've got nothing to say here
Battlestar Galactica - Reactionary stuff mixed with some shity new age crap.
The most recent Fantasy book I've read with some leftist themes is Midnight Tides. Reminded me a Little bit of Morrowind mixed in with some game of thrones. Neal Stephenson Fantasy/Sci Fi stuff is pretty good as well.
Here is some quotes from fantasy author scott bakker (overindulgent but in a good way):
"Both science fiction and fantasy are attempts to compensate for these impending phenomenological disasters. Both genres are consolatory. Where science fiction attempts to recover our lost horizon of expectation through narrative, fantasy attempts to recover our lost space of experience through narrative."
" If science fiction is comparatively ‘socially progressive,’ it has more to do with the implicit understanding that traditional biases against various groups will be progressively discredited, (leaving only the economically rationalized biases against the longest suffering and most systematically oppressed: the poor). In other words, it belongs to the transformation rules. Likewise, if fantasy is comparatively ‘actually reactionary,’ it has to do with the elimination rules: the associative connections between traditional biases and traditional conceptions of the world are difficult to overcome."
"In terms of what Heidegger calls the ‘ontological difference,’ science fiction is primarily an ontic discourse, a discourse concerned with beings within the world, whereas fantasy is primarily an ontological one, a discourse concerned with Being itself. What this suggests is that the socio-phenomenological stakes involved in fantasy are more radical than those involved in science fiction. In Adornian terms, science fiction, it could be said, is primarily engaged in the extension of identity thinking, whereas fantasy, through its wilful denial of cognition, points to the ‘messianic moment,’ the necessity of finding some way out of our functional nightmare."
~from rsbakker.wordpress.com/essay-archive/dragons-over-spaceships/