World health leaders yesterday set a lofty and difficult goal: to wipe out measles, just as they have wiped out smallpox, with millions of immunizations in the 1980s and 1990s.

Measles is not a mere mild childhood disease, but a scourge that kills 1,500,000 children a year, World Health Organization officials explained. In some backward nations, it is the leading cause of death in children under age 4 or 5, because it causes pneumonia, encephalitis (brain inflammation) and brain damage in some children.

It can be eliminated, however, said doctors from 21 countries as they completed a four-day meeting at the Pan American Health Organization, headquarters of the World Health Organization here.

The example they cited is the United States. By next October, it is "likely" this country will have seen its last case of this once inevitable childhood illness, officials of the U.S. Centers for Disease Control reported.

Since an effective measles vaccine became available in 1963, measles incidence here has been cut by 99.4 percent, and the disease's course is steadily downward. There were only 131 cases reported in the nation in the first 10 weeks of this year, with none at all in most counties.

The doctors entered one political caveat, however. Measles can be eliminated "if we're not put out of business by Reaganomics," said Dr. Samuel Katz of Duke University, a conference official. He cited the probable cuts in federal immunization grants from $24.5 million in fiscal 1981 to $21.8 million in fiscal 1982, at the same time that states and localities are hard-pressed.

There is "a lot of anxiety" among local health officials, Katz said. But Dr. Alan Hinman, CDC immunization chief, predicted that the October goal will be attained.

Participants from all over the world agreed that eliminating the disease globally will be much more difficult because:

* In the United States, government and private doctors moved vigorously to immunize all newborns, and localities passed laws forbidding school entrance to unprotected children. Canada, Japan, Chile, Costa Rica, Cuba, Albania, Czechoslovakia and the Soviet Union are moving rapidly in this direction, with Mexico, Brazil and China also showing progress. But much of resource-rich Western Europe seems indifferent, Katz reported.

* In countries such as Britain, it is "anathema" to think of "requiring" immunization, and many private doctors do not regard measles seriously, Katz said.

* Less-developed nations lack resources, and "sadly," said Dr. Ralph Henderson, WHO immunization director, those they have are often used for "curative" medical care for "the privileged few" rather than prevention of the "enormous carnage" of preventable illness in "80 percent of the population." As a result, he said, measles-borne diarrhea, pneumonia and encephalitis kill 5 to 20 percent of children younger than 4 or 5 in some countries.

* Internationally, too, money is tight. Worldwide, about $75 million a year is now spent in the fight against measles, Henderson estimated. About $25 million of it, including $5 million from the United States, is in international contributions. The total will have to go to $300 million, he estimated, with $100 million in international contributions.

Some developing countries, he summed up, are eager to eliminate preventable diseases, some are indifferent, but all will have to do so "if they want to develop their human resources" and become prosperous.