Here in California, there are direct rebates for installing solar panels. In addition, I think there are US government tax breaks for installing solar panels. Panel and inverter prices are coming down, so it might turn out to be a good investment in the long run. Keep in mind that solar panels are typically rated only out to 25 years, and their output diminishes each year after installation. So, keep this in mind with respect to your retirement plan. Yes, it would be nice to not have to worry about power bills on a fixed income. But, you might outlive your panels, and I think that would generally be a good thing.
My understanding is that the inverter/controller ties into your system at the meter and that it acts to reduce your draw from the power company (or even run the meter in reverse when your panels put out more wattage than your home is using). You wouldn't have to worry about switching over at the pump itself; this would all be handled by the PV system. With a VS pump, you can likely keep your power draw to less that 500W for much of the run time, so you would be covered (and then some) using even a small solar PV setup.