The rise and fall of a club achievements is a natural thing in my opinion, as is the case with Barcelona today which has changed from a great club to a mediocre club that is no longer feared on the European continent, but I think Pique decision to retire has nothing to do with Barcelona current achievements, this is because if he is really disappointed with Barcelona performance it is certainly better for him to find another better club now, I think Pique desire to retire cannot be separated from his old age (35 years), I think maybe he has realized at 35 years old that it will be very difficult to maintain his playing form when competing with younger players.
I would guess that Pique realized he is way too old to matter in the rebuilding of Barcelona and he could retire and just enjoy the tens of millions of dollars he made from football and relax. Could they actually make a comeback with off-season transfers and be great next year? Of course they can, this is Barcelona we are talking about but it would not be like an UCL winner type of level and it would not be any big help from Pique that takes them there.
So, it is wise for him to stop right now, that much I can say. Barcelona is not great today, that is known but Xavi is a great manager by the looks of it and his transfers were amazing as well, I am guessing they will get better and better over time.