The average worker in Boston and New York can only comfortably afford a shoebox apartment, a new study finds