This is one of those things that writers often seem to find cute or thought-provoking and I just find annoying. Is Benny Russell real, writing sci-fi stories in 1950s New York? Or is Benjamin Sisko real, experiencing visions on a space station in the 24th century? Neither! They're both constructs of a bunch of Hollywood writers in the 1990s.
Well, from that point of view, I can understand why you would find it annoying.
But the point of it isn't really for you to wonder which is real. Obviously neither is real, but you are not expected to hesitate about that. It's assumed that you will notice that neither is real, as you say, and the point is more to make you think about why the stories we tell about our past and future might be important.
Obviously, this episode wants to be a bit of a tribute to the type of stories told in Star Trek, i.e. presenting an optimistic vision of the future, where humanity has united and accomplished a lot of amazing things, helps make that future possible.
You can see it as the writers motivating themselves in a sense. Why are we doing this? Oh, that's why. (So, that's like Sisko being re-motivated because of his "vision.")
Writing about writing like that can be a little self-indulgent, but I think it's handled in an entertaining way here, so I like the episode.