You may have serious trouble finding long-term luggage storage. Train stations used to do it but in this day and age, most train station lockers are day use only, or a maximum of 48 hours storage. And it's probably not cheap. You could try to store it at a hostel you're going to be staying at while in Spain and pick it up when you get back, but honestly, unless you have a friend who is willing to hang on to it for you at their place, you'll probably be stuck bringing it with you to Morocco. Good luck.