I think that on a total cost basis SF is more expensive than Boston, but I think your money goes a lot further in SF than it does in Boston. The units in Boston tend to be smaller, without amenities, ancient, in need of significant repair or all of the above.
I wouldn't be surprised if like for like, Boston is indeed more expensive than SF... I just checked Redfin for properties in core of Boston (Back Bay, Beacon Hill, Downtown, etc) built since 2000 and roughly average square foot price was $1200. Did the same thing for SF (focusing on SoMa area) and it looks like it's more like $1000/sq ft...