(1) Favoritism: Knowing or being the right person is quite more important than doing a good job. In small companies usually the boss family and close friends are in the top positions. Usually the best way to move upwards is to kiss your boss ass rather than being a good professional. Pretty much the opposite of a meritocracy.
(2) 'Low level corruption': We all talk about the big scandals, the ones that move millions and fill the news. We talk less about what I call 'low level corruption', or everyday small acts of corruption. Not paying taxes, cheating on the utilities, doing some underhanded businesses. It is quite disheartening when you are trying to be an honest citizen. Feeds a lot on point (1).
(3) Conformism: Most people have little ambition in terms of professional development. Spain is one of those countries where civil servant is a dream job. People look for easy and stable jobs where they can get just enough money to get by, and enjoy their free time. Live is pretty good due to the cost of living and public services, and because of (1) chances are you won't get far no matter how hard you try, so why bother? An extensive support network of family and friends gets you covered in most cases, so people are not really worried about hitting rock bottom.
(4) Envy: Maybe due to (3) society as a whole is full of envy and jealousy. We tend to say that this is a country of 'cainites', in reference to Cain, the biblical character who killed his own brother. We also say 'Nobody is a prophet in their own land', another biblical phrase to signify how hard is to get recognized by your peers. We seem to be happier being mediocre together rather than people sticking out. As one of my friends says, 'if I get screwed, everyone gets screwed', as he would sabotage anything that doesn't go his way. Instead of keeping up with the Joneses, we would try to drag them down to the mud with us.
(5) Bad social and economic status for specialized workers: As I said in Spain a civil servant is a dream job. On the opposite side, most specialized jobs are not really valued in any way. Software Engineers would have good economic and social status in other countries; not so much over there. You would be mocked as a geek and nerd by your peers and your work wouldn't be appreciated. Salaries are much lower than other developed countries, not only because of cost of living, but proportionally too. In some places you would be paid a working class income.
Put all these points together and you can see why we can't attract talent. Poorly regarded social status and income, in a place that doesn't value you, with very few opportunities and chances to advance your career.