Once considered an affordable, model city, Toronto is headed for an election while struggling with the same issues confronting other big cities that are trying to recover from the pandemic.The last mayor stepped down after having an affair with his staffer.The mayor before him was stripped of his powers after he admitted to smoking crack cocaine.It would seem that being mayor of Toronto, one of the four largest cities in North America, would come with some major baggage — not to mention its crumbling transit system, growing homelessness and sporadic violent crime.Instead, 102 candidates are on the ballot to lead the city, a record for Toronto, one that underscores the public’s discontent with the city’s direction.As voters in the city of three million — Canada’s most populous and its financial center — prepare to choose a mayor on Monday, Toronto is floundering through the litany of issues that are also confronting other urban powerhouses trying to rebound from the pandemic.For decades, Toronto was known as “a city that works,” lauded as a machine oiled by orderliness and livability, with a robust inventory of affordable housing, an efficient transit system and many other markers of urban stability.Now the city is in crisis after more than a decade of steep budget cuts for social services and the devastating withdrawals of fiscal support for housing in the 1990s from higher levels of government.Voters in Toronto, the most populous city in Canada, will choose from 102 mayoral candidates.An emergency shelter in Toronto that was built as a temporary pandemic measure. Lockdowns and social distancing rules compounded issues that had been affecting the city before the pandemic.The pandemic compounded issues with lockdowns that tightened revenue streams for the city and with social distancing rules that made running it much more expensive.In February, the city’s former mayor, John Tory, resigned after admitting to an affair with a staffer, leaving the city’s deputy mayor, Jennifer McKelvie, in charge.The next mayor will be responsible for reversing the city’s course and restoring the image of the office in one of its most difficult moments. This election is seen by many as a referendum on the fiscal austerity of Toronto’s two most recent mayors, who were both conservatives.“The good news is, this is turning into a change election,” said Jennifer Keesmaat, a former chief city planner who served under those mayors. “People are saying, enough already, you had your chance with the low taxes and the low level of investment.”No matter who is elected, the winner will face a lengthy backlog of deferred maintenance that will eat a significant share of the city’s revenues and encounter a budget shortfall of more than 1 billion Canadian dollars.The candidate leading in some polls is Olivia Chow, a left-leaning, veteran politician, who lost to Mr. Tory in 2014 and has announced a plan to address affordable housing by having the city build and acquire more units. Vowing to “build a Toronto that’s caring, affordable and safe,” she has proposed to raise property taxes, without saying by how much.Entertainers at Ms. Chow’s campaign rally in June. Her supporters barely filled half of the banquet space in a neighborhood that is a stronghold for liberal voters, a possible sign of the splintering support among the large field of candidates.An efficient transit system, a sign of urban stability, was one of the reasons Toronto was considered “a city that works.”But The Toronto Star, the city’s biggest newspaper, and the former mayor, Mr. Tory, have endorsed Ana Bailão, a longtime councilor the paper has called a “pragmatic centrist.” Ms. Bailão has said she would keep property taxes low in a city that already has among the lowest in the province of Ontario.The disinvestment in city services increased with the populist plea of former Mayor Rob Ford to stop what he called the “gravy train” at City Hall. Years of austerity budgets by his successor, Mr. Tory, followed. Both mayors appealed to voters who believed Toronto did too much for downtown residents and not enough for the city’s outlying regions.Mr. Ford, whose four-year tenure ended with him admitting to smoking crack cocaine, found ways to reduce the budget by millions of dollars, including by changing service levels for a wide variety of city services and cutting city jobs.Among the issues most exasperating Toronto residents is the dearth of affordable housing. The average rent in Toronto reached a record high of more than 3,000 Canadian dollars per month, according to a recent report by Urbanation, a real estate analytics company. And the city has a subsidized housing wait list that is now 85,000 households deep.The issue has become such a third rail that among the 102 candidates, not a single one has stepped forward to be the voice of the small faction of wealthy residents who oppose affordable housing developments that increase density.Activists say bold policies, such as rezoning some major streets to build up density and reducing fees and taxes on affordable housing developers, are needed to make up for Canada’s limited building of subsidized housing projects in the last 25 years.“We are so phenomenally behind in our housing supply,” Ms. Keesmaat said. “Tinkering at the margins is not going to be how we house the next generation.”Jennifer Keesmaat, a former chief city planner who served under two Toronto mayors. “People are saying, enough already, you had your chance with the low taxes and the low level of investment,” she said.Toronto had a surge of refugees entering homeless shelters last month.The affordable housing crisis has been exacerbated by surges in the population, which grew by a record one million people as Canada raised its immigration targets. A large share of the newcomers landed in Toronto and surrounding suburbs.The city also had an influx of refugees entering homeless shelters last month, rising from 530 less than two years ago to 2,800.Ms. Chow has proposed to address affordable housing by having the city act as its own developer to build 25,000 rent-controlled homes in the next eight years, as well as by buying up market value properties and letting nonprofits manage them.Liberal voters are split over how to address the city’s issues, and the sheer number of candidates, including a handful of big names in local politics, is likely to splinter the vote to the center and right of the political spectrum.At Ms. Chow’s first campaign rally one week before the election, her supporters barely filled half of a banquet space in a commercial plaza in a neighborhood that is a stronghold for liberal voters.“I’m not very impressed about the turnout today,” said Warren Vigneswaran, 76. He said he was on the fence about voting for Ms. Chow, concerned his property taxes would rise. “But she’s a leading candidate, and her policies are better than anybody else,” he added.Liberal voters are split over how to address some of the city’s biggest issues, which include affordable housing. More