Though I believe Jesus preexisted his birth, I can provide away the verse be true without him doing so.
When considering Jesus as the root of David When you think "root of David" you may be thinking in reference to David's past human birth. However, Jesus has created for us a new birth in the resurrection. Indeed Jesus, himself born again, is declared begotten of God at his resurrection:
Acts 13:32-33 32 And we bring you the good news that what God promised to the fathers, 33 this he has fulfilled to us their children by RAISING Jesus, AS ALSO IT IS WRITTEN in the second Psalm,
“‘You are my Son,
today I have begotten you.’
And indeed we do not fully become adopted into the family of God until our physical bodies are recreated:
Romans 8:23 23 And not only the creation but we ourselves, who have the firstfruits of the Spirit, groan inwardly as we wait eagerly for adoption as sons, the redemption of our bodies.
We are new creatures in Christ when we are reborn first spiritually but ultimately physically at the resurrection when God brings forth the New Heaven and New Earth.
2 Peter 3:13 13 But according to his promise we are waiting for new
heavens and a new earth in which righteousness dwells.
Indeed we must be so recreated for our very physical existence is far too corrupt for the kingdom of God.
1 Corinthians 15:50-57 50
I tell you this, brothers: flesh and blood cannot inherit the
kingdom of God, nor does the perishable inherit the imperishable. 51
Behold! I tell you a mystery. We shall not all sleep, but we shall all
be changed, 52 in a moment, in the twinkling of an eye, at the last
trumpet. For the trumpet will sound, and the dead will be raised
imperishable, and we shall be changed. 53 For this perishable body
must put on the imperishable, and this mortal body must put on
immortality. 54 When the perishable puts on the imperishable, and the
mortal puts on immortality, then shall come to pass the saying that is
written: “Death is swallowed up in victory.” 55 “O death, where
is your victory? O death, where is your sting?” 56 The sting of death
is sin, and the power of sin is the law. 57 But thanks be to God, who
gives us the victory through our Lord Jesus Christ.
This victory over death by our resurrection and rebirth is obtained through the person of Jesus the firstfruit of the new creation:
1 Corinthians 15:20-23 20 But in fact, Christ has been raised from the
dead, the firstfruits of those who have fallen asleep. 21 For as by a
man came death, by a man has come also the resurrection of the dead.
22 For as in Adam all die, so also in Christ shall all be made alive.
23 But each in his own order: Christ the firstfruits, then at his
coming those who belong to Christ.
Jesus has become to us through the new creation the new Adam,
1 Corinthians 15:45-49 45 Thus it is written, “The first man Adam
became a living being”; the last Adam became a life-giving spirit. 46
But it is not the spiritual that is first but the natural, and then
the spiritual. 47 The first man was from the earth, a man of dust; the
second man is from heaven. 48 As was the man of dust, so also are
those who are of the dust, and as is the man of heaven, so also are
those who are of heaven. 49 Just as we have borne the image of the man
of dust, we shall also bear the image of the man of heaven.
And because Jesus is the new creation Adam, we have a new creation genealogy that begins with Christ as the root.
Hebrews makes it clear that this benefit not only applies to New Testament Christians but that also the salvation of the Old Testament saints (including David) similarly rest on the new life in Jesus. Notice how the Hebrew writer speaks of the Old Testament saints this way:
Hebrews 11:39-40 39 And all these, though commended through their faith, did not receive what was promised, 40 since God had provided something better for us, that apart from us they should not be made perfect.
So they are made perfect the same way that we are, in the resurrection, in order to inherit the promises of the kingdom.
Therefore, the root of their new birth in the new creation, as resurrected saints, is the reborn, resurrected, & recreated Jesus himself and, in that way, Jesus can be the root of his ancestors he does not predate except by predating them and us all in the New Creation as God's firstborn.