The only problem with October for visiting Spain and Portugal is that it is too short. Spain is huge, Portugal is very long and the connections between the two aren’t that good. Pick one. If you pick Spain, pick a region. If you pick Portugal, pick 1 or 2 from north, south or middle.