Steve
Did you mean to say that one of the phases was grounded or that the center tap of one of the transformers was grounded? If one of the phases was grounded then this would be a corner grounded delta system and the only voltage available at either panel would be 240V.
When you say there is a noticeable voltage on the fence do you mean you can feel it when the pump is on or your reading it with a tester? Assuming this is not a corner grounded delta system connecting any loads such as the pump that do not use the grounded conductor should not have any effect on the current flow seen on the water piping or fence.
Curt