Dont thrust those numbers. 50k € is a very high salary in Spain for a software developer. The average is probably closer to 35k €
The average is low, yes, but there are also well paid roles that the kind of person a startup in SV would want are probably already doing.
Anecdotally, I’ve been offered jobs paying 80-100k€ based off Barcelona as I’ve been dreaming of coming back to Spain (I didn’t, sadly, as even though they were good local salaries they were a lot lower than what I made)