BANGKOK — Singapore will get a new president on Wednesday, but she will not be elected. Halimah Yacob, 63, a former speaker of Parliament, will become the country’s first female president and the first in five decades to come from the Malay ethnicity when she is sworn in on Wednesday. But what could have been a notable milestone for Singapore’s democracy is instead being publicly questioned as a rigged process, and her legitimacy is already coming under fire. While Singapore’s Constitution does, in fact, provide for voters to elect their president, the government established such narrow criteria for the candidates that only Ms. Halimah made the cut. On Monday, she was certified by the Presidential Elections Commission as the only eligible candidate, and since she has no opponent, there will be no election. “What would have otherwise been a democratic milestone is now besmirched with the ugly stain of an uncontested election — such is the cost of a government that thinks in terms of politics of power, as opposed to dignity,” wrote Rio Hoe, a law student, in a column on the website Consensus SG. The office of the president is largely ceremonial, but its duties include the power to authorize investigations into corruption. The government is headed by Prime Minister Lee Hsien Loong, the son of Singapore’s founding prime minister, Lee Kuan Yew, who died in 2015. Mr. Lee heads the People’s Action Party, which has run Singapore since 1959. Today, it controls 83 of the 89 elective seats in Parliament. In recent months, Mr. Lee has been embroiled in a dispute with his siblings over whether he abused his power as the head of government to circumvent their father’s will. The very public dispute over the fate of the family home has raised questions about the benefits of continued one-party rule. Ms. Halimah was a member of Parliament and a leader of the People’s Action Party before giving up her seat last month to run for president. “I can only say that I promise to do the best that I can to serve the people of Singapore, and that doesn’t change whether there is an election or no election,” she told reporters Monday after she was certified as the only eligible candidate. Her campaign slogan — “Do Good, Do Together” — was widely panned as ungrammatical. She defended it as “very impactful.” The government initially narrowed the criteria last year to permit only a Malay to serve as the next president, on the ground that no Malay had held the post in the five preceding terms. Malays make up about 13 percent of the population, and the government is dominated by ethnic Chinese, who make up about three-quarters. The Presidential Election Committee later tightened the criteria, including a requirement that any candidate from the private sector must have been a senior executive of a company with at least 500 million Singapore dollars in equity, or about $371 million. Two other Malays were considered by the commission, including Mohamed Salleh Marican, chief executive of Second Chance Properties. He had said that if he was elected, he would begin an investigation into the allegations that Mr. Lee abused his power in his dispute with his siblings. Both potential candidates were rejected on the grounds that the companies they headed were not large enough. “There will be nowhere for the P.A.P. to hide from one of its greatest ever mistakes, of undermining democracy and meritocracy in such a foolish way,” wrote Sudhir Thomas Vadaketh on his blog, Musings From Singapore, referring to the governing party by its initials. Eugene Tan, an associate law professor at Singapore Management University, said the government erred in depriving the public of a chance to vote. “There is a groundswell of strong views online,” he said in an email response to questions. The criticism is not directed at Ms. Halimah, he continued, “but more at the electoral process and the government, which is seen as exclusive and disenfranchising.” He predicted that the public would warm to Ms. Halimah, but he said her job would be made all the tougher by the way she is coming to office. “A contest would have added to her legitimacy,” he said.