Domestic cats are often implicated in the infection of Southern sea otters, the idea being that freshwater runoff is contaminated with their feces (and T. gondii).
Vegetables that grow on the ground are more likely to be contaminated with bacteria, since runoff from animal waste is likely the source of contamination.
Experts have come up with all sorts of hypothetical ways the E. coli could have gotten into the spinach, from manure that wasn't properly composted to runoff from cattle farms to contaminated irrigation water.