I disagree. Universities are not the problem. General school is. As a rule of thumb, public universities are better than private ones and the opposite on general school.
Also can't think of any portugese scientist, or portugese based lab renowned for anything in biology or computer science.
Fernando Pereira comes to mind: he made significant contributions to the early development of logic programming (e.g. C-Prolog) and natural language processing, as well as other AI research.
Lisbon is quite good in all of the above since it is well placed on the European circuit for performing arts and has plenty of smallish but very high quality museums. As a music student there I got to hear all of the greats and frankly I got to attend relatively more high-quality concerts there than what I get around to living in Paris, since in Lisbon I didn't have to book everything 6 months in advance. (I'm not complaining about Paris, it's awesome.)
Braga on the other hand has a lot less cultural activity as is normal for a small city. However, it does have an incredibly rich history, plenty of ancient monuments (mostly churches) and is a 45-minute drive from Porto.
If you're talking about the bubbling native culture that you can find in cities like London or New York, than no, Portugal isn't the hottest place. But the SV isn't either.
Also education is not very convincing (considering op might want a family). Universities in Portugal are not that great nor renowned. Many qualified young people go work abroad by lack of local opportunities. I've also heard that healthcare is messy if you can't pay. It doesn't sound like a healthy country to me.
I guess Portugal is good enough if you just want sun, decent food, cheap QoL and good internet, but I wouldn't consider it a thriving intellectual place by any means. But maybe in OP's words, good intellect = finding a sufficient concentration of other engineers. Then it might be enough.