Both Barcelona and Tarragona are "touristy" areas, and are therefore used to seeing foreigners wearing what they feel comfortable in.
In Barcelona in particular you will see many whole families dressed in Premier league football shirts. So I wouldn't worry about your capris and sandals.
From my own travel experience restaurants seem to be more aware (and critical) of how men are dressed when wishing to dine.