Agile regulations against NIMBYism and a world-class civil engineering industry with HQs in Madrid also help.
A good analogy is to ask what would need to be true for Madrid to replicate the AI hub in SF? Great VC, top engineers, certain risk-taking mentality, etc.
So, it's not easy. The environment that creates a fabric for radical innovation is quite different from a statist mentality, although hopefully, both are not mutually exclusive.