For example Uxie or Palkia are encountered for a first time, and neither are shiny and both have low IV stats. If encountered a second time (Say because of all Pokemon being knocked out), will its IV stats reset and/or allow it to become shiny?
Yes actually. It's a method called Soft resetting (or hard resetting if you turn the game off then back on). It's where you save just before encountering a Pokemon to get the desired Nature/IVs/Shininess you want. For certain consoles there are certain buttons that need to be pressed for this to happen. They are:
GB/GBC/GBA games: Press and hold A, B, Start, and Select. XD: Gale of Darkness: Press and hold B, X, and Start. DS games: Press and hold L, R, Start, and Select. 3DS games: Press and hold L, R, and Start or Select.
Credit to Bulbapedia for that.