It’s a really good question and I wished I had investigated more/known what to look out for when buying my current house. The soil is a thin layer of heavy, stony clay on rock which has cost a fortune to build raised beds and add literally tonnes of compost and manure to get it plantable. I’m not sure it would have prevented the purchase as the house and setting are lovely, very private and came with it’s own oak woodland. Maybe I would have regretted it if I had let that put me off though, as most things are fixable. With the exception of the bindweed - that is another pernicious weed I seem to spend my life trying to eradicate
Beware of gardens that have been concreted/paved/gravelled over ... yes you can take it up, but it might be covering a multitude of horrors from pernicious weeds to drainage problems. And if you want a lawn don’t get a terrace with a northfacing garden ... it’s likely to be shaded by surrounding buildings and too dark to grow a successful lawn.