I know that in normal, a boss's level will stay the same, no matter what your level is, but if I were to go into True Vault Hunter Mode and kill a boss at level 40, could I go back later as level 50 and get legendary loot from him that would be level 50? Would his level change to match mine, or would it simply be the loot that would be my level?
Yes; boss levels are treated like normal enemies levels in THVM, so as long as a boss is no longer part of a mission (meaning you've completed and handed in the mission) and you're in playthrough 2.5, the boss will scale with your level. Their loot, as always, is tied to their level, not yours, and capped at the level cap.
But effectively that means at level 50 in playthrough 2.5, repsawning bosses will be level 50(ish) and drop level 50(ish) guns. At all other times (during missions, before beating Warrior a second time) boss levels are locked in due to their mission/area levels, just like playthrough 1.