Is there an anime which degrades or improves quality wise based on what happens in the anime?
Like if someone time travels the world could look a completely different art style including the character? Something like that?
I don't know what you really mean but Space Dandy switched directors nearly every episode so the art style and animation would change a lot.
There was also an episode where several dimensions collided and many different styled versions of the main characters were all in one.
Magical Shopping Arcade Abenobashi is quite different going from episode to episode, but the character designs don't change much.
Mayoi Neko Overrun had 12 directors working on it, and while the story is a fucking mess, the art style didn't change at all (which is great because Peko's designs are based).
Given how common it is for anime/manga/LNs to go the safe route and copy existing works, very few series actually do this art style change thing.
Etotama sort of counts, they go into CG chibi mode to fight and stuff.
Osomatsu-san did it in their opening gag in the first episode that can never ever see the light of day again because Japan has weird parody protection laws.
During the Popularity Poll Arc of Gintama they went through several style changes because one of the characters murdered the mangaka.