Like a lot of sci fi, the sci of “War of the Worlds” is not exactly accurate. Nebular hypothesis or theory puts all planets in the solar system at approximately the same age. Also, not much was known about Mars or any other planet in H.G. Wells’ time, so he can hardly be blamed for imagining life there. It seemed reasonable at the time.
*shrug* Some at NASA are advocating looking for the remains of ancient life on Mars. He may yet prove right.