Global total energy (not just electricity) consumption is currently 180,000TWh/year, or about 20TW. So we would have to capture nearly half of all available geothermal energy to replace current energy usage.
Meanwhile, Solar PV covering (a favorably located) 1% of the earth's surface area would generate 20TW. (This is based on the estimate of 400kwh/year for a 1m^2 panel in a sunny area from https://en.wikipedia.org/wiki/Solar-cell_efficiency.
I don't expect geothermal to do well in this showdown.