The simple answer would be - if you want to take Euros from Germany to Spain as cash and deposit them, you're not breaking any laws, there is nothing to declare to customs (you're still in the EU), it is not "income" so there is nothing to tax, and your bank should be able to receive it without issue (no currency conversion after all). It does however come with the risk of loss/theft en route. So it really depends on how comfortable you are walking around with that much on your person.
If you don't want to carry that much around and your banks are imposing unreasonable fees, here's something you could investigate further (I have not tested it myself): Transferwise offers a service that lets people send money to foreign accounts (in different currencies) for a small fee, at mid-market rates. However, they also offer a "request money" feature which allows EUR-EUR transfers (and some other same currency transfers). So perhaps you could use this feature to simply request money from yourself.
The requester puts in how much they want to receive. Then they send a generated link to the other party. When clicked, that link sets up a transaction for the requested amount, and sometimes a nominal fee (I created a link for a GBP-GBP transfer and it wanted 1 pound extra, but when I did the same for EUR-EUR it didn't want any extra).
I assume you would need two Transferwise accounts, though maybe not? And I'm not sure whether doing this is technically allowed in their terms of service, so you should read those to be sure.
The advantage, if this works, is that neither bank sees it as a "transfer". Rather, the originating bank makes a payment to Transferwise, and then Transferwise makes a deposit to the receiving account. So I can't imagine either bank would be able to impose their foreign-bank-transfer fees for the transaction.
I have used Transferwise for currency conversions, but not the request money feature, maybe other users could chime in if they have used it.