California ranks among the most expensive housing markets per square foot, with $400,000 buying less than 400 sq. ft., shows a new study.