Is it acceptable to use a larger gauge wire downstream of a junction box for a deep well pump?
That depends on how much current the pump draws.

If it is less than 20 amps (most likely unless you have an industrial sized well pump) then this is fine and it sounds like they used #10 for the long run to reduce the voltage drop on the circuit. 

The higher the current draw the higher the voltage drop on the wire. On long runs of wire we routinely up-size the wire to reduce this voltage drop. This is a very common practice.

Edit: The point raised in the comments is a very good one. #12 wire cannot be on a breaker larger than 20 amps. So, your circuit is limited to 20 amps by the #12 wire.