It depends on the scope of the setting. If it's small scale, a region perhaps, then having a race with one culture is okay . . . assuming that there's more diversity over the hill. The dwarves of the vale tend to be bronze-skinned with a society centered around the smithing of iron . . . but legends say there are other types of dwarves in other parts of the world. It's also important to remember that any cultures we put into game terms, will by their nature, be stereotypes. PCs should be able to break those stereotypes if they choose, explicitly so.
I wonder about this!
Right now my homebrew setting takes place in a single valley that can be crossed in two or three days. Originally the races of the valley fell into these roles:
Vampire (any race): oppressive rulers
Tiefling: upper class
Halflings & Humans: merchants, farmers, etc
Tortles: oppressed class, may be servants or slaves
These races were chosen based on the races the players picked for their characters.
If I were reinventing this campaign world, I may want to think of it like this:
Vampire (any race): oppressive rulers
Wealthy Land-Owners: common with rich tiefling families
Common Merchants and Laborers: a mix of people, including generic humans
Oppressed Servants & Slaves: mostly native tortles of the valley, also included anyone who follows tortle religion
Very little has changed except that the caste system is a result of the wealth gap between tortles and tieflings (supported by the vampires of course) rather than being based on race first.
If I were making a "standard" D&D campaign, I might borrow from Level Up and try the following:
Dwarf Culture of the Mountains
Gnome and Elf culture of the Foothill Forests
Halflings Culture of the Farmlands
And then I could briefly sketch out what each of those cultures looks like. The people who are encountered in the Mountain Dwarf Culture area, whether they are dwarves or gnomes or humans or elves, are likely going to be using the same language, wearing similar clothes, and have similar customs. Most are going to be dwarves. But it frees me up from proclaiming "all dwarves are x" and instead saying "this dwarven culture is x."