HG Wells' politics are plain as day in his stories. He was a pacifist and social Darwinist. The defeat of the Martians by the common cold (after the failure of military action) is 100% on point for him.
The common cold thing is a direct reference to what happened to European explorers when they first encountered syphilis in North America.