Abandoned oil and gas wells pose environmental and public health risks. For three decades, the state has mismanaged funds earmarked for minimizing the threat.