To return to Madrid-Barcelona, I'm not convinced that the success of high speed rail in Spain will hit low cost carriers as much as legacy ones. Ave fares in Spain are high (as were, traditionally, and still are today to some extent, domestic air fares) so I'd expect the primary targets of high speed rail are business and affluent leisure travellers.
I think that Ryanair knows this. High speed rail is due to arrive in Valencia, for example, fairly soon, with Alicante following, yet Ryanair has chosen to start flying to both from Madrid. Either Ryanair doesn't think more than a season or two in advance (possible, I know!) or it sees little long-term threat from high speed rail in Spain.