A home inspector noted that well pump and septic were incorrectly grounded with a 3 wire system using the neutral wire for grounding. What is the risk of leaving "as is" vs installing a 4 wire system with an expected cost of $1,500.00? Was code when constructed but not up to current code.
edit: @Ed Beal pointed out that this may be a 220V pump motor. The answer below is based on the assumption it's 120V. Now that I think of it, Ed's probably right, the question is talking about 3-wire vs 4-wire.
Connecting neutral to the ground at the device is a terrible idea, dangerous, especially around water. It really ought to be fixed. I'd turn off power to the pumps if you are doing anything around them.
The simple way to make this safe (and NEC compliant) is to install GFCI protection on the circuit using the existing wiring.
However, there is a catch: if the GFCI protection trips, the well pump and the septic pump will not be operational until someone manually resets the GFCI. The pump motors may be susceptible to nuisance trips.
Another catch: if the wiring is replaced, depending on local code, you may be required to install GFCI even with a ground wire. So you may be getting GFCI either way.
I'm assuming that you're in a the USA with residential power, and the pump is 240V (might say "220V").
In this case the pump is fed by two hot wires, L1 and L2. Each of these is 120V to ground, but since they are out of phase, there is 240V between them. This is what comes out of the "double-wide" 240V breakers. Neutral (white) isn't used in this kind of circuit. Ground (green or bare) is necessary for safety.
It sounds like the cable that was used to wire the pump had a white wire instead of a green (or bare) one. This wire was used to connect back to the ground bar in your breaker box.
If all these assumptions are correct, then it is perfectly safe to keep things as-is. If you did run a 4-wire cable, you wouldn't have anywhere on the pump to connect the Neutral wire, anyway. Also, Ground and Neutral should already be connected together in your breaker box.
If this was my project I would leave it as-is, to not run afoul of the permitting process. For my sake (and the sake of those coming after me), I would mark both ends of this "white ground" wire with green ink or green tape.