President Reagan's victory in the House on aiding Nicaraguan contras, or counterrevolutionaries, sets the stage for renewed U.S. involvement in the Central American conflict this summer, despite substantial differences that must be worked out in a House-Senate conference.

At the insistence of the Democratic-controlled House, Congress cut off aid to the rebels more than a year ago. But the House's vote Wednesday in favor of $27 million in aid, coupled with an earlier Senate vote for a $38 million package, led White House spokesman Larry Speakes to predict yesterday that Reagan could sign an aid package by July 4.

With the House bill more restrictive than the Senate, House members predicted yesterday that any compromise would be closer to their version.

It prohibits involvement by the Central Intelligence Agency and provides aid only for food, medicine, clothing and other strictly defined "humanitarian" purposes. The Senate bill allows the CIA to administer the money and says the aid can be used more broadly, such as for uniforms and possibly radar and trucks.

House leaders said their conferees might compromise on the size of the package, but warned that a compromise allowing CIA involvement or broadening the definition of humanitarian aid would be doomed. They said there was no support in the House for direct military aid to the contras any time soon.

The dramatic turnabout this week was caused by growing distrust of Nicaragua's leftist government, a desire to increase pressure on it, southern lawmakers' concerns about appearing "soft" on communism, compromises by Reagan and the frustration of some at Congress' failure to legislate policy, lawmakers said yesterday.

In April the House rejected both military and humanitarian aid proposals but then unexpectedly defeated a Democratic alternative to provide aid to Nicaraguan refugees outside Nicaragua. Democratic moderates who voted against aid to the contras because they thought the Democratic alternative would pass were bitterly disappointed afterward.

House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.), who led the fight against renewed aid, said yesterday that southerners appeared to have made the difference in the House reversal.

Several southern states voted as a bloc for the proposal. More than 15 of the 26 Democrats who switched sides to support the aid are from the South.

Seven Republicans switched sides, mostly liberals and moderates brought around by such concessions by Reagan as giving up CIA involvement and military aid and declaring that he was not trying to overthrow Nicaragua's government.

All the Democrats from Alabama and South Carolina supported the aid. Florida, Georgia, Oklahoma and Louisiana each had only one Democrat who voted against renewing assistance. Two-thirds of the Texas Democrats backed it.

Not a single Democrat from Massachusetts, Michigan, Minnesota, Ohio, Washington, Oregon or New York supported the aid package.

"They think Reagan is supreme," O'Neill said of the southern Democrats. "They see a wave of people changing parties from Democrat to Republican down there, officeholders, and they're deeply concerned about that."

Majority Leader James C. Wright Jr. (D-Tex.), who also opposed the aid, said after the vote, "Nobody wants to be vulnerable to being portrayed as too favorable to communism. The president's rhetoric has heated up and portrayed this in the most simplistic terms of freedom fighters and communists."

One of the southerners who switched sides, Rep. Butler Derrick (D-S.C.), said he began to change his mind after Nicaraguan President Daniel Ortega visited Moscow right after the House killed aid to the contras.

Derrick said he had assumed that Ortega's previous travel to Moscow had been prompted by the Reagan administration's efforts to isolate Nicaragua.

"When someone's beating in your head, you go where you can," he said.

But to make the trip just after the House rejected aid to the contras "really did aggravate me," he said. "I took it as an intentional slap at the Congress and a slap at those of us who had gone out on a limb to come up with something" other than direct aid to the contras.

Derrick said a letter Reagan sent to Rep. Dave McCurdy (D-Okla.) this week was the clincher. In it, Reagan disavowed any intention of trying to overthrow the Sandinista government, promised to look into human-rights abuse by the contras as well as by the government, accepted humanitarian instead of military aid and agreed to keep the CIA out.

Another southerner who switched, Rep. Michael A. Andrews (D-Tex.), also cited Reagan's letter. "I think the administration has made some significant movement, some significant about-faces," he said, adding that he was frustrated by Congress' lack of action on the issue in April.

He said he also had gotten numerous calls from his district expressing "real concerns about a Soviet presence in Nicaragua, a concern that we'll have another Cuba."

Rep. William B. Richardson (D-N.M.) cited broken promises from the Nicaraguan government. He said that just before the April vote representatives of the government came to his office and promised there would be a cease-fire and negotiations with the rebels if Congress rejected all the aid proposals.

But Richardson said that after the vote, these representatives backed away from their assurances, blaming the trade embargo Reagan imposed. Ortega, he said, "did not keep his word. Instead he went off to Moscow and the Soviet Bloc and collected $300 million."

Rep. Tommy F. Robinson (D-Ark.) said he voted against aid to the rebels in April at the behest of the leadership and against his better judgment. "I let those guys influence me; I regretted from the moment I made the vote," said Robinson, who called Ortega "a swine" during debate Wednesday.

Rep. Stewart B. McKinney (R-Conn.), one of the liberal Republicans who switched his vote, said yesterday that the package adopted contained most of the items he had asked for, including money for enforcing any eventual regional peace treaty and a ban on involvement by the CIA and Defense Department. As a result, he felt he should support it.