Hi, peregrino,
I am not an experienced long distance trekker but have walked a lot of caminos. I had only a couple of little problems with food or water on the Camino de Madrid, both avoidable.
One was in the Segovia to Santa Maria stage, which we walked on a Sunday. Should have known lots of places would be closed, and in fact there was no bar open at all, though several exist. We wound up getting drinks from a jovial family that had rented a casa rural about 8 km before Santa Maria. Once in Santa Maria there were plenty of options for eating. I was walking with Spaniards, and in my experience they tend to be less careful about carrying food/water, relying on bars. That usually works, but not always.
The other was that arriving in Castromonte, I had nothing with me and I was lucky that the bar owner scrounged up some home grown eggs and homemade chorizo to serve me (all probably highly illegal, but YUMMY!). I later learned though that there are in fact other Castromonte food options, which you can see by searching on the forum in this sub-section.
I carry yoghurt, a piece of fruit, and nuts/raisins and that's all I need for sustenance on the walk. Afterwards, I go to a restaurant bar and chow down! When are you walking the Madrid?