It's not that risky. I don't recall the last time I took a MD train with more than 20 minutes of delay although, of course, it doesn't mean it couldn't happen the day you need it to be most on time (but I don't see it a big problem unless things go really bad, see below). In addition, if you missed the Alvia (due to a late arrival of the MD), RENFE should provide you an alternative to get to Hendaye (probably the afternoon Alvia out of Valladolid itself or maybe an option changing trains in Palencia). Any alternative transport offered by RENFE if you miss your connection in Valladolid due to a late arrival of your train from Sahagún won't be a worse option than the direct train from Sahagún because, although you would arrive to Hendaye at the same time than the direct train from Sahagún (if they offer you the option of going changing trains in Palencia) or a bit later (if they offer you the afternoon direct Alvia from Valladolid), you would have to take a taxi to get from Hendaye to Biarritz anyway.
In other words, if everything goes fine (as it goes most days) with the option changing trains in Valladolid you would avoid the taxi ride from Hendaye to Biarritz. If something goes wrong, most likely it'll just mean a return to your initial planned arrival time (or a similar one) so there's almost nothing to risk by trying the option changing trains in Valladolid in the morning (unless you were really really unlucky -e.g.: a strike meaning one or all of the trains you plan to take doesn't run on that day (although that could happen to the direct train out of Sahagún too) or they run but the alternative if the first one is heavily delayed doesn't run...-).
P.S.: If your MD train happened to be delayed more than 15 minutes, you have also right to get part of the cost of the ticket refunded by RENFE (the exact amount vary depending on the exact delay of the train).