There are a lot of near-surface options for heating and cooling. They reduce electrical usage rather than generate it.
I worked on geo control systems for FL buildings. We'd pump water up from the aquifer, transfer heat from the building into it and dump it back. It starts getting cost effective above 10k or 15k sqft.
In northern states they do large closed loops wound over a large yard or field and buried just below the surface to capture daytime heat or pump heat into the earth. Basically a larger version of rooftop water heating.
There are a lot of variants of this but you get the idea.