A "catastrophic" health-insurance proposal for the nation's 31 million Medicare beneficiaries moved a major step closer to enactment yesterday, winning House Energy and Commerce Committee approval by a 30-to-12 vote.

Five Republicans joined the committee's 25 Democrats in voting for the bill. It has been approved with most of the same basic provisions by the House Ways and Means Committee, which shares jurisdiction, so the bill will go to the floor with support from both committees.

But several of the 12 Republicans who voted against the measure yesterday assailed it as a financial time bomb, charging the Congressional Budget Office with grossly underestimating its costs.

The CBO estimates fiscal 1989 costs of the combined committees' provisions at $5.6 billion, while the Department of Health and Human Services puts the figure closer to $15 billion, mainly because of a much higher estimate of the cost of a new outpatient prescription-drug benefit.

"Is there any limit to the expansion of the horizons of the welfare state?" asked Rep. William E. Dannemeyer (R-Calif.) as he offered an amendment to delete many of the benefit provisions. It was defeated, 19 to 8.

"It's a pig in a poke -- you don't know what you have," said Rep. Edward R. Madigan (R-Ill.).

But Rep. Henry A. Waxman (D-Calif.), chairman of the Energy and Commerce health subcommittee, said Republicans were just "throwing up a lot of dirt to see if anything sticks. They're overstating it for political reasons." He said the CBO estimates are more reliable because CBO is a nonpartisan agency while HHS is part of the administration.

HHS Secretary Otis R. Bowen originated the catastrophic-illness coverage proposal for Medicare beneficiaries, but he warned Congress Tuesday that it is adding so many new benefits that he may recommend a veto.

As approved by the two House committees, the bill would increase hospital, doctor, skilled nursing, home health, hospice and other benefits, and guarantee that no Medicare patient need pay more than $1,700 a year out of pocket for Medicare-related services. It would be financed in part by new monthly premiums on all beneficiaries and in part by a special income-related premium. The Energy and Commerce version also includes new Medicaid benefits for the elderly.

The Energy and Commerce Committee, by voice vote yesterday, approved a revised Waxman plan that would require Medicare to pay costs of outpatient prescription drugs exceeding $500 a year, to be financed by a premium of $3.20 a month per recipient in 1989 and $4.90 in 1990.

The Ways and Means version of the drug benefit, approved by that committee's health subcommittee Tuesday as an add-on to the basic bill, would pay 80 percent of outpatient drug costs exceeding $800 a year.

The huge difference between the HHS and CBO cost estimates results in large part from different assumptions about the drug benefit, such as how much the elderly now spend on outpatient prescription drugs (CBO says an average of $250 a year, HHS says $342), and how many elderly people would file drug-reimbursement claims.

Republicans voting for the bill were Reps. Matthew J. Rinaldo (N.J.), Bob Whittaker (Kan.), Michael Bilirakis (Fla.), Don Ritter (Pa.) and Herbert L. (Sonny) Callahan (Ala.).