Ratio of slam titles:
Nadal: 11 clay, 4 hardcourt, 2 grass = 17
Federer: 11 hardcourt, 8 grass, 1 clay = 20
Nadal: 64%, 24%, 12%
Federer: 55%, 40%, 5%
Ratio of slam titles if all surfaces were equal (hardcourt divided by 2):
Nadal: 11 clay, 2 hardcourt, 2 grass = 15
Federer: 8 grass, 5.5 hardcourt, 1 clay = 14.5
Nadal: 73%, 13%, 13%
Federer: 55%, 38%, 7%
Conclusion:
Nadal is better on their best surface
Federer is better on their best 2 surfaces
Nadal is better on all surfaces as he has won at least 2 slams on each surface (even if you divide hardcourt by 2!).
There's definitely a case for Nadal to be the GOAT on 1 surface (clay) and for Federer to be the GOAT on 2 surfaces grass/hardcourt, but tennis is a 3 surface sport and the weakest link will always be Federer on clay. Federer needs to win another FO to have a case for GOAT. Nadal is the GOAT on clay/grass/hardcourt, he has won on each surface at least twice proving that it's not a fluke and that he's GREAT.