In addition to Subway, there's the local chain Pans & Co, which is similar, and from which it will be easy to get vegetarian meals.
Acraven is right about occult ham (great term for it, by the way). I've often seen pieces of ham floating in gazpacho (but not always, so some of it would be fine) or salmorejo (a thicker and creamier variant of gazpacho). Sometimes they're large and obvious, but sometimes I was only aware of them after I started drinking it.
At lunch, many restaurants will have a menu del dia for about €12, including appetizer, main, and dessert - a great bargain. I can't say if they often have a vegetarian option, but these were definitely a great relief to this non-vegetarian, who was tired of the nonstop parade of ham and sea creatures that seemed to constitute the main food options; the menu del dia was usually much more varied. I seem to recall some main course salads; of course, you'll really have to watch out for the occult ham in these, but some might be suitable.
Patatas bravas is a tapa that is vegetarian and widely available; it's fried potatoes in a spicy sauce. Vegetarian tortillas shouldn't be too hard to obtain either; the ones with ham or other flesh proteins tend to be labeled, as the default style is just eggs, onions and potatoes.
I believe Madrid has some dedicated vegetarian restaurants. Look at the Happy Cow website for ideas: https://www.happycow.net/
I had to look in Wikipedia to find out what San Juan de Gaztelugatxe or Dragonstone were (I've never seen Game of Thrones). I learned that Dragonstone was digitally created, so there's no actual castle on Gaztelugatxe - just so you're prepared.
I liked Bilbao a lot. It's got three wonderful museums (the Museum of Reproductions and the Museum of Fine Arts, in addition to the Guggenheim), a large Old Town with interesting, non-chain stores, and an attractive newer town. Not far from Bilbao is the transporter bridge at Portugalete, which was great for me to see (probably not as interesting to many others). Despite all that, I'm not sure I'd spend the time and money necessary to go to Bilbao from Madrid for such a short excursion - particularly when you only have a few days for the whole trip.