Regarding Paul, in that passage he doesn't actually provide testimony on Jesus' genealogy, he's making a theologically based statement. Paul is explicit that everything he says about Jesus he learned either from scripture or direct revelation, "not from any man" (Galatians 1:12), and in this case he's pulling this knowledge of Jesus from 2 Samuel 7:12-16.
In that passage, God tells David that after he dies God will take his sperm and create a Son who will build his throne and eternal kingdom, which early Christians later interpreted be secretly about Jesus. So Paul says Jesus was made from David's sperm not because they had any records stating such, but because scripture said it must be so.
A further interesting note about that is that, though the modern translation of Paul is that Jesus was born of David's line, what Paul literally says is Jesus was formed by God with David's sperm, using the same word he uses to discuss Adam being formed by God with clay (ginomai) instead of the word he uses elsewhere to describe one as naturally born (gennaƓ). So again, he's talking theologically, not historically.