Many environmental problems are due to damage caused by pollutants that accumulate with a time lag following their emission. In this study, we focus on nitrates used in agriculture, which can pollute groundwater many years after their initial application. A dynamic optimal control problem with heterogeneous farmers is proposed. The usual structural parameters such as the discount rate, the natural clearing rate and the lagged time interval between the occurrence of soil‐level pollution and the impact on groundwater are taken into account. We also examine pollution as caused by a continuous set of farms characterised by their individual performance index and by their individual marginal contribution to the pollution. The issue is further investigated by taking account of change in the information context, successively related to perfect information and to asymmetric information. As a result, when the delay between the spreading of N‐fertilizer and the impact on the aquifer increases, that is, the longer the lag, the steady‐state pollution stock and the steady‐state shadow price of the stock both increase. Moreover, we show that the optimal regulation may require a decreasing amount of fertilizer over time, even in the case of initial underpollution.