Hi Eileen.
Frankly, no amount of research can prevent people from coming across one problem or another in Spain, so you should never blame yourself for inadequate research. I also find that if one problem is so all-consuming, such as this one might be for you, you tend to then ignore other possible problems, so it kind of serves a function. Anyway, apart from the psycho-analysis, I'm wondering if you might find one of these nice mostly-expat groups who help rescue dogs? They might also have some ideas of what you could do. The problem is that if you report any of these dog-owners to the authority, you have to put your name on the denuncia and then they will know it is you who did it, and they wouldn't be happy bunnies. So I wouldn't go down that route. It could be that it is one particular dog setting them all off? Maybe you need to turn private detective and try and identify which one it is and then either you or a willing volunteer go and talk nicely to the owner, perhaps with a gift? Sounds barmy but I'm trying to brainstorm here.
The other approach would be to maybe get hypnosis which tells you that you like the sound of barking dogs. I love the sound of the train at the back of my garden for instance and that would be really annoying to some people. (I admit it is a bit far-fetched to like the sound of barking dogs, but it might be possible to re-programme your brain in this way - others must be able to sleep through it, so it would be good to know how they do it. The earplugs sound like a good idea too)
Anyway, perhaps others who have successfully handled this situation will have better ideas. The main thing is that you need to find a solution which works for you as you don't want this marring your experience. But as I said, as one problem flies out of the window in this life, there is usually another one lurking in the shadows. Just be thankful that you're not dealing with death or illness of a loved one etc. All the best with it.