It's primarily what the motor draws, the esc and battery need to be able to supply what the motor needs. No easy way to determine that other than experience, or an on board data acqusition system like an Eagle Tree setup. Lots of variables, vehicle, gearing, running surface, driving style, yada yada. But a 5700kv is known to need a lot of amps, it's a pretty powerful motor.
Yeah racing I think it is has reasonably cheap packs that many have had good luck with.