Quoted By:
So, if Nebby does wind up being Ashs 5th Pokemon and not partly taken care of by Lillie, how do you think its going to be handled?
Right now I'm thinking that for many months its just going to be hanging around with Ash and it won't be involved in battles - Ash will try to use it to fight but all it will do is pew at him - and generally just winds up taking care and having fun with it until the plot kicks in which forces it to evolve into Nebby2.0. By that point in time Ash and it should have made a pretty good bond and be closer towards the end of SM setting up it evolving into Solgaleo for the UB/final villain arc.
I see Solgaleo staying behind in Alola similar to Greninja staying behind in Kalos to protect the region and as a way for Ash to not permanently have a legendary on his team as well as having an emotional goodbye.