Some things in Spain are clever and make a lot of sense. Often they have a simplistic approach which works well, but not the HPA, which is poorly written and open to interpretation. They also don't follow English Law and follow the system of legal precedent, which avoids haggling over the same issue many times.
In the UK, the buildings of a block of flats should be insured by the freeholder, or freehold owning company to avoid complications. It's not good if you own the top flat and insure the notional value of your portion of the building, if someone lower down the building fails to insure - re-instatement can become a bit difficult!
It's different for terraced houses as you don't often have "shared" walls and so in the UK the practice is that they are insured individually which seems to work well. Insurers have market agreements to deal with large claims and the cover provided is generally similar. Equally as important is that in the UK most people insure. But in Spain it is different, the insurers are not as organised, the cover varies and there is a higher level of under insurance. The saving grace is that in Spain serious fire losses are less common than in the UK - I don't know why.
The only way to be sure you're OK insurance wise if you own a flat is to have a meeting with everyone and agree that the property is insured once with one insurer, noting the interest of the various owners for the total re-instatement value of the building plus perpheral outbuildings and swimming pools etc.
For me the process should be different for terraced property as reaching agreement will be more difficult and the sum insured per unit will be different. But there should be agreement between owners on the decision decided and this must be put into print for reference, if the worst happens. You really don't want to find out that owners have insured on a different basis, or not insured at all at this time.