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 story is an allegory about the evils of colonialism, told from the perspective of the colonized (in progress). HG Wells is on the record about that.
The common cold thing is a direct reference to what happened to European explorers when they first encountered syphilis in North America.