He was a Communist. Even mentioned it a bit in “The Time Machine” of wanting to see what a future Socialist/Marxist society of “equality” would look like (they took all that out in the film adaptations). We know now what it does look like in practice: totalitarianism, no electric power, and human $hit on the sidewalks and streets.
What is interesting is that the old fashioned Commies wanted tight control of borders so that they could steal stuff from prosperous citizens.
It would never have occurred to them to import starving third world people to bankrupt the system—since they actually wanted their Commie world to work.