I would start before Somport and do the walk uphill because it is gorgeous!
Have you checked blablacar trips? I took a blablacar from Madrid to Oloron-Sainte-Marie to start my camino from there, it was much easier than finding a decent itinerary based only in public transportation.
This site is run by Ivar at in Santiago de Compostela.
This site participates in the Amazon Affiliate program, designed to provide a means for Ivar to earn fees by linking to Amazon