I would personally not even consider a new or used EV. Those batteries are too expensive to replace, and can even be damaged with a small accident and require replacement thereby totaling the car.
As for conventional ICE? As a general rule (not vehicle specific) any (typically German) car that requires the engine overhaul to need pulling out the engine for a timing chain. I think normally VWs and Audis, Mercedes and BMWs of several eras require unbelievably expensive engine maintenance which will generally exceed the value of the car.
People tend to forget even though your getting a $10,000 used car, you're still PAYING to maintain a $100,000 car.
Anything post, say 2010, needs to be looked at with skepticism. Lots of cost cutting, lots of electronic bloatware that goes bad and is very expensive. Also lots of very cheap plastics involved as well, I have noticed. Fake leather seats do not age well. Cheap dash materials, etc. break.