I've lived in both recently, and London definitely wins for more the more decrepit Victorian stock, but SF is no stranger to the flat conversion phenomenon and I'd say the average living space in the city is not much bigger than London.
However what tips the scales for London being more affordable IMHO is the fact that there is not 500 square miles of water smack in the middle spreading everything out. For instance in London I lived 9 tube stops from the center and it was < 5 miles by bicycle. In the Bay Area I also live 9 BART stops from downtown SF but it is 15 miles, I can't cycle (because no bike path over the bay bridge), and I get less for my money relative to London. Throw on the anemic transit here, and London is much more doable on a budget.