It makes sense that there'd be a resemblance; after all, Carrot is the archetypal essence of the farmboy king. When the series started, even his being raised by dwarves only meant that he came from the countryside and was raised by "good, law-abiding folk," since Pratchett hadn't done the extensive exploration of dwarfly culture and the incidental exploration of being a six-foot tall dwarf he's done since.
The problem is they didn't flesh David out any beyond the archetype. He's not a character, he's a checklist. And while you could argue that that's supposed to be what the show does, character growth needs someplace to latch on to, and David is all smooth and polished edges. (Not that he's the only one in the cast; I'm getting really annoyed at Plucky Disney Princess Michelle, who is about one dancing rodent away from a musical interlude.) And while you could also argue (with a bit more weight) that it's supposed to be archetypal, the best explorations of archetypes are the ones like Carrot--the ones where the archetype is the basis of the thing, not the whole of the thing, because if the archetype is all there is, why are we even bothering to explore?
(Since this more-or-less makes Silas the Vetinari of this scenario, it also explains a lot of the problems I'm having with the way the show is going with him: it keeps anvil dropping that he's a bad king, and I keep going, "No, he's a bad person. He's an excellent king." If the show wanted to take me to task about what a terrible person he is, I might go along with it, but they're being ambiguous on that, of all things.)