Do you need to supply higher voltage to a solenoid if using a flyback diode

The 12V from your mains supply seems to be connected to your 5V lines.

What is the current capacity of this supply?
Are you taking the measurements with the pump turned on? The way you have it that pump could produce severe interference, you have a relay but are bypassing the isolation it affords because you need the 12V to power the rest of your circuits.

The capacitors on the output of those regulators should be of the ceramic type. Often a larger electrolytic type is wired in parallel with a small ceramic type. I would put a 0.1uF ceramic capacitor on each power pin of the processor, as close to the pin as possible.

Have you done that coil resistance measurement yet?

It looks to me that your problem is power supply related.

Not according to your diagram.