Edgar Rice Burroughs' John Carter books are public domain. They've got those on Project Gutenberg, but they may be too much "stock characters" for you.
Would some of the Lewis Carroll stuff scratch the "science fiction" itch?
It's a bit of a stretch, but Mark Twain's Connecticut Yankee in King Arthur's Court at least has the character development. And, strictly speaking, it is time travel. ;)
Finally, if quasi-fantasy and mythopeia do anything for you, there are things like George Macdonald's Phantastes and G. K. Chesterton's The Man Who Was Thursday. Both those authors were influences on C. S. Lewis. But we're really straying away from anything that's strictly science fiction there.
This right here: Linux From Scratch (LFS).
If your goal is to learn, there is no better way than retrieving each tool individually and compiling it from the bottom up. LFS is Gentoo ... without all the ease of use built in. More accurately, LFS is a just a set of instructions for where to go to get the code and how to compile everything you need to build a Linux system from the bottom up.
I don't live in the world of LFS or Gentoo, but my foray into LFS gave me a much greater appreciation for the distribution(s) I do use as daily drivers. I greatly appreciate my distribution maintainers.