If you can kill something without feeling bad because of its race, that's fucked up. A group of goblin bandits can be fun, but they're villains because of the bandit thing, not the goblin thing. Why should a group defined by plundering travelers be more acceptable than a group defined by being short with green skin?
That said, the undead are, more often than not, fair game. Undead are a mockery of the life that came before and a defilement of their corpse, so killing them is a way of honouring the dead.