In general you can move food items freely between any EU countries, without restriction. (The only times when EU countries can restrict the import of food items from other EU countries are when there are temporary 'emergency' measures in place, such as during the BSE crisis). Further, there can be no taxes or duties levied upon such goods at the point of importation.
However an exception is made with regard to tobacco and alcohol products, where countries can charge duty on imports (other than on items which are for personal use only and when they are also imported in person, not by post). 'Personal use' includes bona fide gifts to others, where nothing is expected in exchange.
So, while you could take your hamper into Spain with you as a traveller (without incurring any duty charges) it's likely to get hit for Customs Duty if you send it by courier.