A lot of classic science fiction is basically "x with spaceships" where x is the Napoleonic Wars, or feudal Europe or the Wild West or what have you, and the "science" is little more than set dressing.
Well, it was meant to be parsed as:
Star Trek is speculative fiction and space opera.
Star Wars is just space opera.
Some space opera is also speculative fiction, but I wouldn't say it is a subset. I wouldn't call some space opera stories speculative fiction at all.
They're all classified as science fiction.
(Yes, yes - there is no consensus on these terms...typically science fiction is considered a subset of speculative fiction, and here I inverted a lot of things).