I'm thinking if the car has service records you should be fine.
Some engines you can see quite a bit looking into the oil fill. Either no baffle or partial baffle lets you see top of cylinder head, rocker arms, valve springs, etc. That is the area you want to look at for evidence of excessive sludge or varnish. A light coating of golden varnish is generally harmless. Another area you can check is the dipstick, above the typical oil level. Some neglected engines will show heavy varnish or deposits on the stick right above the typical oil level.
Some engine installations are virtually impossible to easily determine internal cleanliness due to oil fill pipe, baffles, and difficult to remove valve covers or oil pans. It is my suspicion that no car dealers would go to the effort to check these engines for internal cleanliness alone.
While I have no experience in luxury new car dealerships (Lexus etc.) I have observations from working during college as mechanic in used car dealer. It was owned by an ex used car manager of the town's Cadillac dealer. The used cars were not purchased with much time expenditure. The owner drove them half mile or so to see how they "ran out." He'd check trunk, interior, engine compartment, glance under vehicle for leaks. If the engines misfired, made noise etc, he would sometimes ask my opinion of how much work it would need. He'd keep the cars on the lot for about a month and if they got stale, he'd take them to auction, wholesale them and replace them with something else. All these transactions had less than thorough inspections. As one who worked on these cars I saw everything from well maintained engines with lots of life, to moderate deposits which would probably be OK if the new owner started taking care of it. At worst I saw sludge monsters with tons of blowby. I'd point them out and often they'd go to auction sooner rather than later.
Again this is different than a new car dealership with a car with good service records. But on any as-is sale you're basically on your own to determine the condition of the engine.