I was discussing this in previous beta threads, and I was told that eSIMs are no longer deleted if you restore using Apple's new program for Windows. Apple actually states this in a new section of their website about it, and doesn't specify that it works in some countries but not others, so I understand that it should work in Spain.
But yes, the management of eSIMs in Spain is counterproductive and undermines all the good aspects of this technology. And it's all due to the excessive greed of Spanish operators, who are never satisfied and need to squeeze even more money out of Spanish users. Being charged more for a duplicate eSIM than for a physical SIM is a clear symptom of this.