The simple answer to your question is that it is not stretching it at all to use the ancestor to refer to the descendent in Hebrew. Often the descendent in Middle Eastern culture identifies with their ancestor by name.
The use of the name David fits within the bounds of Hebrew idiomatic usage as a euphemism. When God speaks of David here, it is a reference to the promise He made.
To understand the verse it is worth looking at the context and origin of the idea presented in it .i.e "David their king, whom I will raise up for them"
It starts back in 2 Samuel 7:8-13
8 “Now therefore, thus you shall say to My servant David, ‘Thus says
the LORD of hosts, “I took you from the pasture, from following the
sheep, to be ruler over My people Israel. 9 I have been with you
wherever you have gone and have cut off all your enemies from before
you; and I will make you a great name, like the names of the great
men who are on the earth. 10 I will also appoint a place for My
people Israel and will plant them, that they may live in their own
place and not be disturbed again, nor will the wicked afflict them any
more as formerly, 11 even from the day that I commanded judges to be
over My people Israel; and I will give you rest from all your enemies.
The LORD also declares to you that the LORD will make a house for you.
12 When your days are complete and you lie down with your fathers, I
will raise up your descendant after you, who will come forth from you,
and I will establish his kingdom. 13 He shall build a house for My
name, and I will establish the throne of his kingdom forever.
That is the initial prophesy that Nathan spoke to David shortly after he became king. Almost all of the other passages referring to this prophesy speak of David's descendent.
Biblical hermeneutics teaches us that it is import to in interpret a passage with other like passages and if at all by the same author. Earlier Jeremiah writes about this prophesy but references David's descendent with the term branch.
Jer 23:5 “Behold, the days are coming,” declares the LORD,
“When I will raise up for David a righteous Branch;
And He will reign as king and act wisely
And do justice and righteousness in the land.
This shows that Jeremiah understood the Messiah to be the one to come, not a resurrected David but a descendent of David.