Very good and interesting observations.
Indeed, Kepler's moon story fell under the category of edutainment, because he wanted to give readers an idea how the earth would look from the moon. To get there, however, he used a supernatural element that got his poor mother (witch?) into some trouble (the rewrite contained more clarifying footnotes than the actual story text).
I'd say with Jules Verne it was the same. There's definitely less story but more in-depth education for the younger readers.
With a TV show like Star Trek it's the same, but here the edutainment element used to be reflections on the human condition. Since Roddenberry wanted to address social issues and avoid censorship obstacles, he transplanted the stories into the far future or exotic contexts (not to dissimilar what Rod Serling did for "The Twilight Zone" earlier).
Frankly, I don't see that much "science" in Star Trek (technology is rather supernatural) but a positive invitation to explore the unknown (which I'd consider a vital ingredient of good science fiction which has become rather scarce - IMHO, contemporary science fiction is rather science "action" with the focus on conflict, vengeance and war
I can't help but regard the depiction of society in TNG as rather utopian and close to perfect. If science fiction's obligation is to improve our living conditions, one may ask what purpose it should still be good for in a utopian society other than to provide escapism (i.e. Barcley's holodeck addiction).
And - to quote Bones from TMP - "What is there more than the Universe?"
Of course, higher levels of existence. Curiously, I was always amazed how Picard reacted to Q. Now, Q provided the opportunity of exploring this realm but Picard said no to the invitation (admittedly, he's more the archaeologist type of guy and "physical" explorer). Just my 0.02 $, of course.