@ WardenDresden - It really does depend on your definition of the genres. The most convincing definition I've heard separates them based on thematic concerns. Under this rubric Fantasy is defined as any genre which seeks to embody various aspects of human nature in characters and have that struggle play out through the conflict of the story. So good vs evil (most fantasy stories), freedom vs oppression (LOTR arguably), love and tolerance vs hatred and bigotry (Harry Potter), faith vs doubt (Chronicles of Narnia). Science fiction is more about putting humans (usually) in situations beyond what the audience is used to dealing with, and then depicting how people will cope in those situations. By this metric for instance Star Wars is unequivocally a fantasy story more than anything else. If only I could remember where I heard about this way of classifying things. Cause I like it.
Anyway in answer to the OP, Middle Earth is certainly a contender. It may not be the BEST example, but it certainly deserves some credit for actually kind of, inventing the idea of stories being set in a coherent and comprehensive alternate universe. Seriously. Look for that idea as one in mainstream media prior to Tolkien. It doesn't pop up much.
Asimov's Foundation Universe is interesting to read about as well. But I'm sorry, I just never bought the idea that human society can be predicted with math.
Also, I'll say something crazy and sacrilegious that will get me flayed alive in this community, but I, having grown up through the late 90's and early 2000's have a lot of affection for the sort of parallel magical world in Harry Potter. It might not be the most serious or literary work to be mentioned in this thread, but the setting itself is fun, whimsical and sometimes a little absurd, but at the same time, it makes sense on some level, and can be surprisingly realistic and actually quite dark, and rather compelling. In spite of some major inconsistencies.
I also like the fictional world of the cartoon Avatar: The Last Airbender (the cartoon not the terrible M Night Shamaylan movie). The idea is that there are four nations, each one centered around the fact that some members of the society can magically or telekinetically manipulate one of the four classical elements. Since the show itself centres around a century long war of oppression and colonialism we tend to see mostly the combat implications of these skills, but every once in a while we see the more practical day to day implications of how people would employ abilities like that, and it's surprisingly well thought out. Also all the cultures are inspired by Asian influences (or in one case, Inuit culture) and for once it's nice to see this handled well and respectfully, rather than as a kind of tokenism or based on broad stereotypes.
Also the world of the cartoon the Venture Bros. populated by unionized super villains, and incompetent super scientists, and a cheap Vincent Price knock off. It's so funny.
Also the space western setting of the short lived TV series Firefly merits a mention. The odd blending of Sci-fi and Western didn't always make sense, and sometimes seemed like elements of it were just thrown in for the sake of being either spacey or westerney. But when it did occasionally actually examine the politics for why outer space might be just like the wild west, it actually got pretty interesting.
For the record though, and this is rather disheartening, but the ONLY fictional universe I would actually choose to live in is the 24th century as depicted on TNG and DS9 era Star Trek, for the simple reason that it's the only depiction of a fictional universe that is actually an improvement in terms of standards of living over the industrialized world now. And even then, working in space seems to come with a distressingly high mortality rate, unless you're lucky enough to be one of the seven or eight core command staff of the ship you work on.