RICHMOND, FEB. 21 -- The key money committees of the Virginia General Assembly today endorsed the thrust of Gov. Gerald L. Baliles $22.5 billion state budget for the next two years, while adding $90 million to the spending plan and altering some basic components of his education and health care initiatives.

Also, the Appropriations Committee of the House of Delegates and Finance Committee of the state Senate voted to fund a hotly debated sex education program after repeated assurances from administration officials that local school systems would be fully reimbursed for the program even if they devise their own "family life" curriculums.

In one tension-filled round of voting tonight, the Senate panel reduced Baliles' proposed two-year moratorium on new hospital and nursing home services to one year and added several exemptions allowing those facilities to obtain new equipment.

That vote could set senators on a collision course with House members, who included no moratorium in their version of the 1988-90 budget, preferring instead to study the issue of containing Virginia's skyrocketing health care costs.

The full House and Senate will vote on their respective versions of the budget bill this week, sending the matter into a conference com- mittee to resolve the two chambers' differences.

Although the committees shuffled around tens of millions of dollars in the budget Baliles sent the legislature last month, the governor got essentially what he wanted in today's critical rounds of voting, according to lawmakers and administration spokesmen.

The biennial budget, which represents Baliles' only real opportunity to leave his imprint on state spending, includes the second- largest increase in school funding in state history; $65 million for community mental health programs; continued funding for a Chesapeake Bay cleanup, and state employee and teacher pay raises.

Those items were approved without difficulty today.

"There's a tremendous amount of concurrence, and the differences are more in form than substance," said Paul W. Timmreck, the director of Baliles' budget department.

The two fiscal committees also showed considerable agreement on a number of potentially divisive issues.

The two sides added nearly $22 million to education for the biennium; each relaxed what would have been expensive mandatory school programs in local jurisdictions; each embraced the creation of a low- interest revolving loan fund for housing, and each was careful to sprinkle money for local improvements, also known as "pork barrel" projects, judiciously around the state.

As if to confirm the importance of the committees' work, which was observed by standing-room-only crowds of lobbyists, state Cabinet officials, reporters and the merely curious, Del. Dorothy S. McDiarmid (D-Fairfax), chairwoman of the House panel, opened her session with the invocation: "It looks like we've got the best show in town."

Some of the day's drama came when the two committees voted to spend $4.7 million to establish a "family life" program in public elementary and secondary schools, a proposal that many parents have objected to because of its sections on human sexuality.

Several conservative and rural legislators voted for the funding only after two key administration officials retreated from a state Board of Education decision to link full state reimbursement to compliance with mandated guidelines for family life education.

On the House side, state Education Secretary Donald J. Finley released a letter in which S. John Davis, the state schools superintendent, said the board's standards were "not an absolute determination" of when sex education should be taught to young people.

That decision, Davis added, "will be determined by each locality choosing to design its own program."

Davis repeated the message in person on the Senate side, where Finance Committee member William E. Fears, an Eastern Shore Democrat, congratulated him and Baliles for giving jurisdictions greater leeway in teaching family life.

"I want to commend you for backing off," Fears told Davis.

Later, finance panel Chairman Hunter B. Andrews (D-Hampton) pushed through the one-year medical moratorium over the protests of industry lobbyists who this month scuttled the moratorium's predecessor -- an administration proposal to charge fees on hospital and nursing home beds to pay for indigent health care.