Lately, we've seen DnD and Pathfinder move away from some of the more blatant signifiers, like renaming "race" into "species" and "ancestry," and in the case of Pathfinder, having systems in place to mix ancestries in a character build. DnD has decoupled good and evil from species, and pathfinder has done away with good and evil entirely ( keeping a vestige of it present for things like demons and angels).
Race is almost alwys tied to a language and a culture, with, say, kobolds having the same certain cultural signifiers all over the world. To an extent, this makes semse because different peoples in these games can have different physical abilities, or have different origins entirely, which would naturally lead to them developing along different lines -- If one people can breathe underwater and another was born from a volcano by a specific god's decree, that would inform how these cultures behave.
Is it possible to have a fantasy along these lines with a materialist underpinning, or is this very idea of inborn powers anathema to that sort of approach?
I don't think it's possible to fully remove racism from "elves n orcs" fantasy but I think you can leave it a lot better than you left it.
I think framing it as species rather than ethnicity is preferable. There really are major biological differences between humans and dwarves, in a way there aren't between races. Lean into it and make sure everyone knows these are different things, by also having all the species have multiple ethnicities of their own, and having multiple cultures distinct from both. Make dark-skinned elves be annoyed when people call them Drow, because that's a specific culture of spider-obsessed imperialists, and that specific elf you just insulted was from a tribe of nomadic cave fishers. Do the usual tension between agrarian humans and nomadic orcs on one side of the continent, and then do it the other way around on the other, because these are properties of the way different subsistence systems clash with each other, which is cultural. Have a multi-ethnic multi-species culture that aims all its prejudices at people who dress differently and don't speak their language rather than along ethnic lines, because that's how the Romans did it and people need to be reminded that prejudice has always existed but racism hasn't.
And then once you do the lore work of making sure everyone knows that species, ethnicity, and culture are all different things, don't fuck up and give stat modifiers to ethnicities and cultures.