I've been wondering the same thing ever since I started going for walks in those sunken parks out here during the summer and fall time; they're substantially cooler at the bottom (to the point of having to wear a hoodie at night when the surface temp is 80+) although that's more like eight feet of depth. I've known a few people out here who have used open partially-shaded pits about 3-4' deep to extend mid-season vegetable growing a little more into the warm season and swear by them. Too much work for me for lettuce in May, although if grocery prices keep going up...
Even if it worked though, it seems like for a greenhouse it would be a major flood risk during monsoon season for a large investment.