THE GOOD NEWS is that the country is spending a rising although still small share of national product on cleaning up the environment. The bad news is that it may not be spending most of the money on the greatest risks. That is the burden of the latest assessment by the Environmental Protection Agency.

The new work raises a fundamental issue that has become increasingly difficult to discuss. Particularly in the Reagan years, the environmental debate in this country itself became so poisoned that there ceased to be a middle ground. Current environmental programs suggest a set of priorities; presumably they are aimed at what the country perceives as its greatest environmental dangers. The question is the extent to which those perceptions have a basis in science and the extent to which they have been skewed by politics.

The current cleanup programs are all hard won. Environmentalists see any suggestion for reordering them on scientific grounds as a likely cover for retreat. They have good grounds for their uneasiness, in that environmental data are often inconclusive, and offending industries have too often seized on any weakness in the data as an excuse not to act. Partly to offset industry's tendencies to minimize risks, environmentalists have come to exaggerate them. In the annual struggle for marginal legislative and regulatory advantage, both sides in the debate have ended up trashing science as often as they have invoked it.

The laws are such that much spending, private as well as public, is focused on cleaning up hazardous waste from leaking industrial landfills, underground storage tanks and the like. That effort takes up more than a fourth of EPA's modest budget. It and the funding of mostly municipal sewage treatment plants together take up more than half.

Both these are worthy activities, yet neither inside nor outside the agency do many scientists who have been surveyed believe that they address the greatest dangers the country faces. A recent report from a science advisory board listed instead such problems as air toxins, indoor air pollution, pesticide application, climate change, ozone depletion, habitat losses and destruction of species, on some of which EPA expends hardly any money or effort at all.

No EPA administrator wants to preside over misdirected effort. The current administrator, William Reilly, was recently asked about an estimate that cleanup expenditures might rise to nearly 3 percent of gross national product. "What it says to me," he said, "is that at this level of expenditure, there's a very large obligation to get it right." He wants to stimulate a debate, yet does not want to dismiss or be seen as dismissing programs. He's right to try, and it would be a great step forward if both sides -- environmentalists and their opponents -- gave him room.