Not a game code reader, but this is roughly what I understand for the segments I know
(anything segment not mentioned is something I do not know):
SWSH Egg odds:
To my understanding it doesn't force the PID to become shiny, it merely rerolls.
Once you land on a shiny, regular 1/16 to be square, 15/16 to be star. SWSH overworld/wild shinies:
The game first calculates whether you would encounter a shiny,
then compares encounter's PID to your save's TIDSID.
You can get square shinies 2 ways:
a. You naturally rolled a square shiny PID (rare, effectively double shiny), or
b. When the shiny check is 'yes', and you rolled a non-shiny PID, it'll be forced to square. (common)
This means you can only get star shiny for this group by:
1. Rolling a 'yes' on the shiny check, then
2. Having the PID + TID/SID combo be star
Regular shiny odds are 1/8192 (ignoring any rerolls you may have).
Assuming you've hit on 'yes' for the shiny check:
Square shiny -> 65521/65536 (Regular square shiny 1/65536 + non-shiny PIDs forced to square 65520/65536)
Star shiny -> 15/65536
[So you're effectively rolling for a double shiny: hitting yes on a shiny check, then rolling a star shiny combo naturally] Max Lair shinies:
I don't know the odds (if I recall they are regular odds without any boosts),
but I do know that when they occur, they can only be star shiny. Max den shinies:
The game actually generates a pair of TIDSID that is only used and stored temporarily, which is colloquially called the fake trainer TIDSID.
This is used to determine if the mon's PID would be shiny; game matches the fake trainer TIDSID to the mon's PID.
If I recall correctly, it follows the standard Square 1/16 and Star 15/16 split (these odds are presuming you land on a shiny, which is 1/8192)
It would force the mon's PID to match yours square if the combo is square, and forced star if the combo is star.
If I recall they are regular odds without any boosts) BDSP roaming shinies:
Similar situation to max den shinies.
Ultimately this is one of those 'just encounter it and not worry' type of scenarios. As long as the encounter doesn't restrict it by shiny type, just go for it and not think too much.