While the engine survey/inspection would be money well spent, esp in the event of a serious problem (or potential for one), I think you can tell a lot by some other indicators and if you're at all mechanically inclined you can make some reasonable judgements.
Knowing the hours on the engine helps, but it's an iffy stat... on an older boat you really have no idea if the meter was always working, if the engine's been changed there may be no accurate indication of the new engine's hours (though a second engine is good news - means someone else has bucked up for it!)
I look for the cleanliness and apparent care in the engine compartment. Even if the boat looks pristine, the engine may show signs of lesser care. Oil leaks, dirty/oily bilges, rusty parts, corrosion (usually an indication of coolant leaks let go too long), and a general 'forgotten about' look there will usually mean the engine has not been truly looked after and an inspection may be indicated more strongly.
OTOH an engine you could 'eat off of' often means it's been cared for, regularly maintained and could well be good for years of use.... but at the same time a clean exterior is not a guarantee of internal condition.....
It's still a judgement call, but generally diesels are pretty hard to kill....
Thanks for the words Faster. I have owned a '72 30 MKI with an A4 for 10 years and do all my own work (except rigging).
Unfortunately, I know next to nothing about diesels. They all seem like loud, stinky, vibrating, mysteries to me
I plan on taking a class, but that's down the road a bit.