The way the University works is that every upgrade updates your empire's tech level. This implies that losing or gaining University buildings does not affect your tech level.
Buildings can be upgraded up to Uni level + 1 but existing buildings (or buildings that get constructed with plans) at higher levels function to Uni level + 1 only. For this to work you need one University per empire only.
Each University level above 25 will give +1 to the maximum level a normal resource building can go; for a max of +5 at University level 30 (the University itself is not required to maintain this bonus). Added to the maximum Stockpile bonus, that means the Capitol's normal resource buildings can reach level 30 while those on other planets can reach level 20.