I suppose that men and elves might be considered different "races," due to their occasional interbreeding.
I believe the other "races" of Middle Earth are more appropriately called species.
We've never had to deal with a world where there are multiple intelligent species. In such a world, our present definitions of racism wouldn't make any sense.
Dwarves and ents and orcs and trolls aren't "human" races at all, they're of entirely different species. In some cases the differentiation is even higher up the taxonomic scale. Ents would arguably be of a different Kingdom than Men.
The orcs in Tolkien began as elves and were twisted by dark powers into the orc ‘race’. Orcs and elves more closely related than men and elves in Middle-Earth canon.