It does not matter whether the leakage occurred before or during your ownership and occupancy. Under both state and federal law, you, the homeowner, are the responsible party. You may be able to seek reimbursement for the costs of cleaning up soil or groundwater contamination from previous owners.
If you sell your home with an underground storage tank in place, whether or not it has been decommissioned, the discovery of contamination in the future may result in an environmental contamination claim being made against you.