You have the same number of hit dice as stated in the creature's stat block
The Druid's Wild Shape ability reads (PHB, p. 67, emphasis added)
Your game statistics are replaced by the statistics of the beast, but you retain your alignment, personality, and Intelligence, Wisdom, and Charisma scores.
[...]
When you transform, you assume the beast’s hit points and Hit Dice. When you revert to your normal form, you return to the number of hit points you had before you transformed.
You are still a character and so can still spend your hit dice to regain health during a short rest.
For example if the druid has 17d8 Max Hit Dice and spends three during a short rest to regain health they then have 14d8 Hit Dice. If they then Wild Shape into a Brown Bear they have 4d10 Hit Dice because that is what is listed on the Brown Bear's Stat block. If they remain as a Brown Bear over the course of a short rest and spend a Hit Dice they will then have 3d10 Hit dice. If they revert from Wild Shape they will return to having the 14d8 they had before becoming the Brown Bear.
Even if you were not a character you reasonably should be allowed to spend hit dice otherwise there are issues where NPCs and Familiars cannot regain health without healing (see How can Pact of the Chain warlocks' familiars heal?).