Medicare, the federal medical safety net for 29 million elderly and disabled Social Security recipients, is in fair worse long-range financial shape than Social Security and, without some change in current law, could run out of money as early as 1989 or 1990.

For the moment, Medicare's problems have been overshadowed by those of Social Security itself -- the basic old-age, survivors and disability insurance (OASDI) system.

The OASDI trust funds are now thought likely to run out of money in a year ot rwo. In contrast, the Medicare or health insurance (HI) fund has a balance of about $19 billion this year and appears likely to stay in good condition for the next seven or eight years.

For this reason, both the administration and Congress have focused on OASDI and paid little attention to Medicare; indeed, some experts have even suggested dipping into the Medicare fund to help tide the others over.

"You swab the wound that's bleeding most," said a Republican staff aide on Capitol Hill.

But Medicare's good health is illusory. In every economic scenario projected by Medicare planners, the health trust fund eventually will be exhausted. The basic causes are the continuing escalation of hospital costs far faster than inflation or wages and the gradual aging of the population.

The forthcoming annual report of the Social Security trustees -- the secretaries of the Treasury, Labor and Health and Human Services -- will emphasize these points.

If the economy performs poorly (the pessimistic scenario), HI will go broke as early as 1989 or 1990.

If the economy performs in middling fashion (the intermediate scenario), HI will go broke around 1992-94.

And even if the economy performs extremely well (the optimistic scenario), the fund will go broke by around 2005, according to the government projections. t

Moreover, although it is a much smaller program than OASDI, its long-range deficit based on the intermediate scenario is almost twice as large.

According to projections made by the government and published by former Social Security chief actuary Haeworth Robertson in his new book, "The Coming Revolution in Social Security," the HI trust fund deficit over the next 75 years (the excess of outlays over collections) is about 3 percent of the national payroll subject to the Social Security tax. That works out to an annual average of about $40 billion a year measured in terms of today's economy (although most of it will come after the turn of the century).

By contrast, the OASDI system under the same scenario has a deficit of only 1.52 percent of payroll.

Actuaries warn that because HI projections depend heavily on assumptions about hospital costs, which may fluctuate wildly depending on public policy decisions, 75-year projections for Medicare are not much more than guesses, and less dependable than the 75-year projections for the OASDI system. Still, they are about the only guidelines available.

Medicare was established in 1965; it is by far the largest of the Great Society programs Congress enacted in the Johnson administration. It has two parts: hospital insurance (HI), and a supplementary medical insurance program (SMI, also called Part B) which covers out-of-hospital doctor costs. The two programs are funded quite differently.

HI is paid for by part of the Social Security tax, currently 6.65 percent each for employers and employes on the first $29,700 of wages; 5.35 percentage points go for OASDI and 1.30 for HI.

SMI, on the other hand, is funded from participants' premiums (the premium has been $9.60 a month as is rising to $11 this month) and from general revenues. Originally, the idea was to split the cost 50-50 between premiums and Treasury payments, but Congress eight years ago placed limits on increases in premiums, and today about 70 percent comes from the Treasury.

All told, about 29 million people are eligible for the two programs: people on the Social Security disability rolls, regardless of age, and people receiving Social Security retirement benefits provided they are 65 or over.

Medicare has been growing at a far faster rate than the population or government expenditures generally.

Ten years ago, total HI outlays were $5 billion and SMI outlays about $2.2 billion.

In fiscal 1982, according to Guy King, acting director of the office of financial and actuarial analysis of the Health Care Financing Administration (HCFA), HI outlays are estimated at about $33 billion and SMI $15 billion.

The growth of Medicare helps explain why the government has become the giant in the health care field.

By 1979, according to the Department of Health and Human Services, the two Medicare programs plus the smaller federal-state Medicaid program for the poor accounted for nearly three of every ten dollars spent for personal health care.

One of the major reasons for this growth of Medicare is that hospital costs have been rising faster than prices and wages almost since the program started. In 1978, to take a recent year, aggregate inpatient hospital costs for all patients nationwide, not just Medicare, rose about 12.7 percent compared with 8.1 percent for a weighted average of wages and prices in the economy. Because elderly Medicare patients are now living longer and need more intensive care than the average hospital patient, the costs for Medicare inpatients actually rose 15.4 percent the same year, according toa HCFA analysis published in the most recent trustees' report on the Medicare system.

Compounding this problem is the gradual aging of the population, and a looming load of added elderly people when the baby-boom generation starts retiring after the turn of the century. At present 11 percent of the people are 65 and over; that will rise to 16 percent in the next century.

In the last administration the future problems of Medicare were already becoming obvious, but Congress paid little attention. Whenever the issue was raised, the response was that President Carter's future national health insurance proposal would absorb Medicare, and that his hospital cost-control bill would reduce prospective Medicare cost.

However, NHI never came close to enactment, and cost containment was beaten by the hospital lobby.