President Reagan and Walter F. Mondale tuned up the rhetoric yesterday for tonight's showdown television debate in Kansas City, the event that Republicans say will effectively end the challenger's dreams of an upset and that Democrats hope will spur a come-from-behind victory.

In recorded radio talks, Mondale said Reagan has presided "as a genial chairman of the board" over a failing foreign policy, and Reagan said the Democratic nominee has a record on defense "so weak he ranked right next to George McGovern."

Both the president and his challenger fly this morning to Kansas City for the 90-minute confrontation on foreign policy, defense and arms control that may prove to be the pivotal event of the campaign.

The major networks will carry the debate starting at 8 p.m. A transcript of the debate will be carried in the later editions of Monday's Washington Post.

The polls all show Reagan maintaining a lead over Mondale but differ significantly on the margin.

A Washington Post-ABC News poll released earlier this week had Reagan up by 12 points, and a New York Times-CBS News poll published yesterday had the margin at a statistically identical 13 points.

But a new Gallup Poll had the Reagan lead at 20 points, and an NBC News survey earlier in the week had an even wider margin.

All the polls, except Gallup's, showed that Mondale had made inroads on the Reagan lead in the days since their Oct. 7 debate in Louisville on domestic issues. The president's uncharacteristically faltering performance in parts of that debate led to second-guessing among his campaign aides about his preparation for that debate and brought to the surface some discussions about Reagan's age and mental agility.

White House assistants have predicted that Reagan will be back in form tonight and will look strong enough to close the door on any upset possibility. Mondale aides said he is primed and eager for the biggest political event of his life, a repeat win over Reagan that could shift millions of votes in the next two weeks and make him president.

While the two men completed their preparations in Washington and taped their weekly paid political broadcasts, the Democratic vice-presidential nominee, Rep. Geraldine A. Ferraro (D-N.Y.), drew a crowd of more than 25,000 people in Amherst, Mass.

Reagan's broadcast from the White House was clearly part of his pre-debate warm-up. He assailed Mondale's votes as a senator against the B1 bomber, the Trident submarine and the cruise missile as evidence that Mondale is "possessed of one simple but very wrong idea: American strength is a threat to peace."

He said Mondale's voting record on defense issues is as one-sided as that of former South Dakota senator McGovern, the Democratic presidential nominee in 1972.

"What troubles me most is how little he seems to have learned about the dangers of weakness and naive thinking," Reagan said. "I don't question his patriotism. I do question his judgment."

Mondale, meanwhile, spent his fourth consecutive day at his Cleveland Park home, meeting with advisers about the debate. His taped radio talk honed in on what he considers Reagan's most vulnerable area.

"When it comes to arms control," Mondale said, "a president cannot be a genial chairman of the board. He cannot delegate the mastery of this most decisive of all subjects. His homework is not optional; it's essential."

With two weeks of campaign time left, Mondale clearly needs a strong boost from tonight's debate to make the contest competitive.

The Post-ABC News poll, while dramatizing the distance the Democratic challenger has to go, did contain some information suggesting that the task may not be impossible.

There were few really undecided voters left -- 4 percent of the sample. But while seven of 10 voters expressing a preference said they were "absolutely certain" of their choice, three of 10 said they were only "fairly certain" or "not certain at all."

Slightly over half the "soft" Reagan voters said they expected tonight's debate will influence their vote a great deal or a fair amount -- 10 percent over the national average.

Mondale has some initial advantages with those "soft" Reagan votes. One-third of them consider themselves Democrats. One-third of them have an overall favorable impression of Mondale. About half of them say they believe that Reagan sides with the special interests rather than the average citizen. More than one-quarter of them said they believe that Mondale is more likely than Reagan to keep the United States out of war.

About 7 to 10 percent of the total electorate polled were Reagan supporters who are Democrats, or Mondale admirers, or fearful of Reagan on war-and-peace peace issues, or in some cases, all three. If they were impelled by tonight's debate to shift from their "soft" preference for Reagan to the Mondale or undecided column, the race would be a virtual dead heat.

But other factors are not nearly so favorable to Mondale's prospects among these "soft" Reagan voters. Barely one-eighth of them say they believe that Mondale is more trustworthy than Reagan in handling overall foreign policy, and barely one-sixth believe that Reagan is too old to face the pressures of the presidency for another four years.

At the same time, 30 percent of Mondale's supporters called themselves "soft" to some degree.