Would not the target audience need to also be considered?
Yes, but you are largely mistaken about the target audience of each of these works. You are correc that Harry Potter is geared toward upper grade school children. However, the Chronicles of Narnia was not geared toward high-school children, but younger children, say, 8-11. Same with Tolkien's The Hobbit. The Lord of the Rings, on the other hand, was written for a decidedly adult audience - poet W. H. Auden, in his 1954 review of The Fellowship of the Ring for the NYT, said that "No fiction I have read in the last five years has given me more joy than 'The Fellowship of the Ring.'" It seems to be found most frequently in the Young Adult section of the library, but I personally suspect this is due to the foolish idea that adult readers are beyond this sort of thing.
Most children know the difference between fantasy and reality. Judging by the people who write the most nonsense about Harry Potter and LOTR, on the other hand, it would appear to be the adults who have difficulty distinguishing the two. (I don't know how many very silly critiques of HP I have seen that claim it teaches authentic witchcraft. It is to laugh.)
Another point would be that LOTR and Lion, witch, Wardrobe, are so fantasy that the stark contrast with reality is readily apparent. Harry Potter on the other hand blurs the line in that the Muggle's world is very modern and comparable to our own, ie. cars, motorcycles, trains, etc.
I fail to see a difference between there being a gateway to Narnia at the back of a wardrobe, and entering the magical world of Hogwarts via a secret train platform. The "real" and "magical" worlds are equally distinguished in both.
And remember that LOTR is Tolkien's attempt to fabricate a mythology for England. Implicit in his story-telling is the idea that he is merely the editor of manuscripts written originally by Bilbo and Frodo Baggins. In fact, Bilbo's main motivation for disappearing from the Shire on his eleventy-first birthday was so he could get away from it all and get on with the writing of There and Back Again, which of course we know in our world as The Hobbit.
Lewis and Rowling, by contrast, make no claims, even fictional or tongue-in-cheek ones, to be writing a "true story."