Ground links between Spain and Portugal are limited and often very slow. You can take a look at some of the options on the Rome2Rio website. Understand that it's pretty good about highlighting the existence of a particular mode of transportation, but less good at providing accurate information about how long it will take and how much it will cost. What you need to do is keep clicking through the links until you find the website of the appropriate bus or train operator. That's where you need to look for real-world info on schedules and fares.
If I were going to have a long layover somewhere along the way, I would prefer that it not be in Vigo. There is nothing wrong with Vigo, but there's nothing particularly interesting about it, either. It has a very, very tiny historic area down by the port, which is not very close to either of the train stations or the bus station. Much as I am not a fan of flying mid-trip, I'd very seriously consider doing it here, and then spending the time I saved seeing a bit of Santiago de Compostela, Pontevedra or even the tiny border town of Tui. Or perhaps Ourense is interesting and you could break the trip there; I haven't been to Ourense.