Later works, less so.
Even in a lot of hard SF, a lot of the science is wonky if it falls outside of the author's special interest or area of expertise. Relevant to Asimov, the only reason robots have "positronic" brains in his stories is that positrons were a new discovery at the time and it sounded cool and futuristic to him.
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).