We can. And they have.
They detected the “Spanish Flu” genome/DNA, which killed many millions worldwide, in graves, from exhuming bodies... but that was only a hundred-or-so years ago. The P4 Bio-Labs have samples of it and experiment on it. But thousands of years is a whole ‘nother matter.
It scary what they have in this bio-labs; enough to wipe the Earth sterile... except for termites, crickets and demonKKKrats. Heh...
More difficult to do without preserved soft tissues.
Maybe the teeth, marrow, or growth plates on the femur could have detectable traces of any contagion.
But mostly any disease would have to be inferred from changes to the bones themselves as in the case of syphilis causing deformations.
Hoping the tech improves enough to make it vastly easier.