A well looked after engine can run past 100k miles.
A badly looked after one can be destroyed within 10k.
There is no electronic record that you can ever search that can tell you that.
Engines may look the same from the outside.
How does it run, is what is important. Mine's now at 56k and I hope the reliability and performance it has demonstrated since I have had it continues.
In some ways, as a POV maybe right maybe not, bikes with higher mileages early on seem to be better, as mileage means they are getting 'ridden', not 'trashed'. I think mine had its first owner for a few years and they did some proper solid mileage on it. Bedded it in nicely.
If it ends up with someone who likes to rev-bomb it every few miles from new, then expect it to blow up quick.