“Jerry Brown will be a hard act to follow, because of his gravitas, his expertise, his clear priorities, and his negotiating skill,” said Miriam Pawel, an author who has just written a history of California told through Mr. Brown’s family. “One may agree or disagree with his priorities, but he has proved to be an astute politician who effectively corralled competing factions to close deals.”

Indeed, to a considerable extent, Mr. Villaraigosa and Mr. Newsom have tried to attach themselves to parts of the legacy of Mr. Brown, who has not endorsed anyone in this contest. But they have been critical as well, particularly on the rise of poverty and the homelessness crisis that unfolded under Mr. Brown.

For Mr. Newsom and Mr. Villaraigosa, the challenge of inspiring voters goes beyond being judged against Mr. Brown and trying to turn out an electorate that seems, over all, happy with the direction California is going. They also have the hurdle of troubled impressions and memories that linger from earlier chapters in their careers — particularly when many relationships between women and powerful men, even consensual ones, are being revisited.

As mayor, Mr. Newsom cut a glamorous figure across San Francisco. In 2004, Harper’s Bazaar called him and his wife at the time, the Fox News host Kimberly Guilfoyle, “the new Kennedys,” photographing the couple in expensive designer clothes at the home of Mr. Getty and his wife, Ann. Mr. Newsom’s marriage to Ms. Guilfoyle ended in 2006; the mayor remained politically popular.

“He rocketed up,” Phil Matier, a political columnist for The San Francisco Chronicle who covered Mr. Newsom. “I’m not sure he had his helmet on when he did it.”

Mr. Newsom was frequently seen at events with celebrities and gained a reputation as a partyer. Around the same time in 2006, city gossip and political columns said he was dating Brittanie Mountz, who was around 19 at the time; he was roughly 20 years her senior. (Mr. Newsom, in an interview this week, denied they were dating. “She was a friend,” he said. “I won’t go into details. Dating is not a term I would use. But friendship, yes.” Ms. Mountz declined to comment).