If you are between Malaga/Sevilla/Granada and Barcelona, I would pick one of the first 3. It'll still be warmer than in Barcelona, and I think since they're smaller they may be more fun with a kid. I loved Granada, it's really not that big and felt very different. Sevilla was nice too, but I've never been to Malaga. San Sebastian and Bilbao are good options too, but I would look up the weather first - I'm pretty sure you can get away with swimming in October in Andalucia, but wouldn't be so sure in the Northern part of the country. Really I would think through though which culture you are more interested in - Barcelona and Andalucia are pretty different in what they have to offer.