Why are people comparing the Nexus 5 to the SGS 5? The specs on the SGS 5 tramples on the Nexus 5. Specs cost money.
I'm not sure that they do, but even if they did... is that spec difference even apparent on the BOM? On the S4 vs Nexus 5 it was not, meaning that specs do not cost money aside from the respective margins on each device. We obviously don't have a BOM on the S5 yet, but we can assume it's in the $200 - $250 range for now (most devices are, the iPhone is the only sub $200 device I recall from last year), the S3 was about $205, the S4 around $214 - $236, the HTC One $217, the Moto X was between $221 and $226, Note 3 is $232, LG G2 (most of what the Nexus is) $223... you get the point. Wildly different devices, almost all more or less the same specs on the most expensive components... The Nexus 5 probably cost slightly less than the G2, but lets speculate low end and says it's $210. The S4 that's $4 to $26 more to produce is worth $300 more? Don't forget the Nexus is better spec'd than the S4. No, that's a subsidy. So the cost difference is entirely on the margins.
As far as specs go, almost identical processors, identical RAM, significant difference on the camera (probably $8-15 per device), very similarly priced screens, same Bluetooth and WiFi licenses, Sammy does have to pay Microsoft for the micro-SD card slot (likely $4-6 per device), water resistant coating and a different charging port (USB 3.0 vs microUSB stanard). With that same low end $210, we add the itemized differences at their high ends, that's about $25-30 difference to produce. $240 is fairly in line with the increase seen between the S3 and the S4 ($205 to $214(up to $236) and matches very closely with the S4 price.... so again, that's not a difference in "specs" that cost money, it's just the impact of the subsidy.
Of all the devices listed there, we have a mean of about $215 and I'd estimate a standard deviation from mean of around $11, for which all but 2 devices fall in to. We would need to include more devices to make it statistically sound, but for these purposes we can safely say a flagship phone with current development technology costs about $205 to $230 to produce - and we'd be right on most devices, regardless of their "specs", size, thinness, software, etc. So do specs cost money? Sure, a range of around $20-25 per device. When we're talking about a price difference of $350, we're talking about 7% of that price difference (at max) being the "specs" difference. The only actual noticeable difference in end user cost is the sales approach, in which Samsung is profitable on mobile devices and Google is not (or if they are, it's barely and probably), seeking to merely reimburse their Nexus partner for their costs.
The Nexus without a subsidy is probably a $600 device, it's not an oranges to oranges comparison.