We study a model in which the level of environmental regulation depends on abatement costs, which depend on aggregate levels of investment in abatement capital. Firms are non-strategic. When emissions quotas are not tradable, there are multiple competitive equilibria to the investment problem. Allowing trade in permits leads to a unique socially optimal equilibrium. For a given distribution of investment, allowing trade in permits has an ambiguous effect on the optimal level of regulation. Previous results on coordination games with non-atomic agents are applied to the problem of environmental regulation with endogenous investment in abatement capital.