This southeast Asian trading nation, which is suffering a serious and unaccustomed recession after 20 years of spectacular economic growth, received the sympathetic ear of Secretary of State George P. Shultz today and a promise that the Reagan administration will continue to fight for an open trading system in which Singapore can thrive.

Shultz, in a lengthy private meeting with Prime Minister Lee Kwan Yew and in public comments made to reporters, spoke of a "real danger" that protectionist trends in the United States and elsewhere in the world could set back economic growth and political stability.

Lee, 63, his country's first and only prime minister, made much the same point last October in a speech to a joint session of Congress during a state visit to Washington.

Lee declared then that "putting up barriers to America's markets . . . would set off a chain reaction which would result in a downward spiral of the world economy" and lead to widening international strife.

Even with protectionism held in check, this high-rise city-state is experiencing its second consecutive year of lowered output after averaging more than 10 percent yearly increases since its independence in 1965.

The economic assessment of the U.S. Embassy here is that an overall upturn "can't occur before next year" and is not assured even then, according to a senior U.S. official.

The source of some of Singapore's trouble has been sluggish economic performance by the United States, but "they haven't tried to blame the downturn on other countries," the official said.

The United States is Singapore's largest trading partner, with about 17 percent of total trade.

U.S. investment in Singapore is five times that of Japan, the next largest foreign investor.

More than 10,000 Americans reside in this city-state of 2.5 million people.

Speaking to reporters as he flew in for a 22-hour visit, Shultz cited uncompetitively high wages and overly ambitious high-tech plans as reasons for Singapore's economic decline.

Lee's government, which has frozen wages, has begun an unusual deficit spending program and is reconsidering its economic ambitions, "is still looking for the right answers," said a senior U.S. official.

In the meantime, Lee, who had said he planned to retire around 1988, has recently hinted that he may reconsider if the slump continues.

According to S. Rajaratnam, Lee's longtime political associate and now senior Cabinet minister, the current plan is for Lee eventually to become president, a mostly ceremonial post.

As president, however, Lee would have greatly enhanced powers that would allow him to intervene in emergency situations.

Reporters were told in a U.S. briefing that this possible change in plans has not been a surprise to Singaporeans in view of the unexpected seriousness of the downturn.