Generally speaking, train travel on high speed trains is luxury travel. For budget travel in Europe, take the plane. Or the bus if you have time. Neither planes nor buses are as comfortable and convenient as modern high speed trains.
The economic explanation is related to the following points:
The price is determined by supply and demand.
Turnover is the number of passengers times the price they pay. If you
have fewer customers, you will need higher prices to achieve the same
In the case of the Eurostar, there has been and there still is a fierce competition: trains, planes, ferries. As a result of this competition, a lot of ferry routes have been closed after the opening of the Tunnel. The Eurostar also has a huge catchment area. Just look at Paris and London. In terms of inhabitants that's nearly half Spain! Add Brussels, parts of Belgium, the Netherlands and the Lille region. Don't forget that the tunnel is not used and paid for by Eurostar alone. There are also the shuttles for cars, trucks and buses.
In the case of Spain there is less competition. What's the alternative? The distances are rather long and buses slow. The plane? The airports are out the cities and the quality of Iberia & co ... umm, well ... And as I said above, the catchment area is smaller for these AVE trains. And don't forget, the infrastructure had to be built too in Spain!