Yes, speculative fiction. It’s romanticised, sure, but just because something has space ships does not make it science fiction.
Star Wars is fantasy. Magic space wizards who duel with laser swords are not science fiction Not to mention the story structure and thematic throughline are veeery traditional fantasy, and the elements of science that are there in Star Wars are completely glossed over because they’re just there to make the scenery more unique.
Replace the extra-terrestrial life in Star Wars with elves and dwarves. Replace the spaceships with airships and it’ll still be the same story, a fantasy story. It just wouldn’t have the unique setting it does.
Replace the aliens in Star Trek with that, the world-building and the spaceships? The story would be completely different. The new frontier wouldn’t be space, the Federation wouldn’t be interGalactic. It would just end up being a pretty dumb innaccurate historical fiction