I've thought about this problem before, and one of the more elegant solutions I've seen partly implemented in some games, is extending the foundation of the building below the ground. Here's a quick example I've mocked up:
On flat ground only some, (or none at all) of the foundation/basement would show, but when placed on sloped terrain, the foundation would show. This would allow the building to contour to the ground instead of altering the ground mesh to meet the building.
In the past these kind of polygon collisions would have caused issues, but as I understand it, modern engines don't usually have a problem doing this. The real issue is that the foundations sections would be still be rendered by the GPU even if they're hidden completely below the ground. This could slow down processing time possibly taking a hit on the FPS.