Spain's neighbors could also have lower energy prices with more interconnection to Spain. The whole network diversifies, which would be more beneficial for Europe as a whole.
That would raise electricity prices in Spain just like prices in Sweden - which traditionally had low prices - went up with the 'diversification' of the European distribution network. While these price effects were mostly seen in the southern half of the country due to the way Sweden is divided into 4 price regions with most of the interconnects being found in the southern-most region the recently inaugurated 'Aurora' interconnect with Finland caused prices in the north of Sweden to shoot up [1].
The issue is that Spain has three interconnected neighbours (France, Portugal and Morocco) and all of them are overflowing with electricity.
The best candidate for lowering prices would be France, but France would most likely re-export that electricity to other countries, and paying to build up the internal grid to carry electricity that is neither bought by nor sold to French actors isn't very attractive.
Ideally Spain would interconnect with Italy, but that's more expensive.
Hvdc in the ocean requires way less right of way than hvdc over land. Running oceanic hvdc from Spain to Germany might have some trouble in the English channel where it would be in territorial waters.
France systematicaly refuses to increase the power of their interconect with Spain, as well as to make a gas pipe that would provide cheap Algerian gas to the rest of europe.
That being said, building new interconnections makes no economic sense for France. The country has no unserved consumers close to the border. That means any electricity imported from Spain would have to be carried further. That involves grid spending paid for by french consumers, without any benefit for them.
The same goes for gas pipelines. No one enjoys big infrastructure projects for stuff they don't really need.
[1] https://www.aftonbladet.se/minekonomi/a/Exwx4A/elprissmocka-...