Some suggest Wells The Time Machine holds some Victorian era preconceptions about race. As Darwin and others shared their ideas of survival of the fittest, some used this as justification for treating other races as lesser beings.
In the novel, the Eloi are a tribe of humans who have lost any interest in acheivement or hope for anything better than the presumed paradise they live in. They have devolved into simple, cattle like creatures. The Morlocks at first seem to be primitive, sub-terranen humans, but we find they have evolved great intelligence but spend all their time underground and feed on the Eloi people.
Wells seemed very interested in this idea of evolving and degenerating more so than racism, but certainly racism could be used to explain the Eloi and Morlock relationship.
Many critics call H.G. Wells one of the fathers of science fiction. One of the science fiction tropes that he is attributed to having established is the genre’s criticism of humanity as a species. The time traveler wishes to go far into the future so that he can witness what humanity makes of itself in the acceleration of civilization, and so what he presents in his observation of the future consists of what we might understand as a critique of the human race.
When he first arrives in the future, he exclaims,
The work of ameliorating the conditions of life – the true civilizing process that makes life more and more secure – had gone steadily on to a climax. One triumph of a united humanity over Nature had followed another. Things that are now mere dreams had become projects deliberately put in hand and carried forward. And the harvest was what I saw!
However, as he observes and understands more, he realizes that humanity has diverged into two different races, the Eloi and the Morlocks. The Eloi live only for pleasure, but they have become dull-witted and unable to create or think very much at all. The Morlocks have become similarly ignorant, but they are more brutish, preying on the defenseless Eloi for food. The time traveler concludes that the Eloi are the descendants of the upper classes, who have succumbed to extreme decadence, and that the Morlocks are the descendants of the traditionally suppressed and overworked underclasses, who, though no better off finally than the Eloi, have embraced their animalistic role and turned on their one-time oppressors. He summarizes the situation:
And this same widening gulf [...] will make that exchange between class and class, that promotion by intermarriage which at present retards the splitting of our species along lines of social stratification, less and less frequent. So, in the end, above ground you must have the Haves, pursuing pleasure and comfort and beauty, and below ground the Have-nots, the Workers getting continually adapted to the conditions of their labour.
This description would have been familiar to contemporary readers as a description of their own times as well. In The Time Machine, H.G. Wells extrapolates a social trend, and predicts that if it continues unchecked, it will spell the doom of the human race, a doom that he imagines in the future setting of the novel.