Workers in Boston and San Francisco earn more on average than their counterparts in New York. But Brooklyn alone has a higher cost of living than Boston or San Francisco.