THE VOTERS KNOW it, and so do the candidates in Maryland's Fifth District congressional election next Tuesday: Gladys Spellman is a tough act to follow. But someone else is about to be chosen to represent the district, and the election is important, coming at a time when the whole federal government is undergoing structural diagnosis and fiscal surgery.Already, the voters have chosen well in their primaires, having nominated two attractive candidates: Democrat Steny H. Hoyer and Republician Audrey Scott. Both are middle-of-the-road, diligent public servants with keen perceptions of local issues, constituent service and the interests of federal employees, who make up a heavy bloc of the electorate. But there are differences that point to Steny Hoyer as more qualified for the job.

The most significant different is Mr. Hoyer's experience in public office. More than Mrs. Scott or the third candidate on the ballot, Libertarian Thomas P. Mathers, Mr. Hoyer offers a broad understanding of the local, national and international issues that will necessarily concern the next representative from this district. His record as a state legislator -- 12 years in the Maryland Senate, the last four as its president -- also earned him the respect of colleagues on both sides of the aisle in Annapolis.

Mrs. Scott, as mayor of Bowie, has won high marks for her responses to citizen requests and her interest in regional issues. And there is good reason to believe that her role in the state Republican Party should grow in the future. But by and larger, her command of the foreign and domestic issues has been limited to general support of President Reagan's economic policies -- including a strong endorsement of the full Kemp-Roth tax proposal, which should be a matter of considerable concern to inflation-conscious voters. Mr. Hoyer, while supporting a stronger defense, prefers budget cuts patterned after the "Democratic alternative" that House Democrats tried to substitute for the Reagan-Stockman measures.

Mr. Hoyer, as a member of the Senate Finance Committee, was quick to master the deicate accommodations necessary in the balancing of judicious state spending with essential projects and constitutent services. His combination of political knowledge, legislative expertise and ability to grasp constituent concerns would serve Mr. Hoyer well in the U.S. Congress.