So, are you sure your simulation using resistors accurately represents the bucket with electrodes in it? I'd be very surprised if the conductivity of ordinary tap water would be enough to pull down those two inputs with internal pullups.
Anyway, If everything works perfectly EXCEPT when the motor is connected (i.e. you literally just pull out one of the motor wires) then it suggests the motor is creating electrical noise that gets picked up in the rest of the wiring. I recommend connecting a ceramic capacitor across the motor; 100nF or larger.