The challenge New Yorkers face has propelled the issue of affordability into the forefront of this year’s mayoral election.