When you find a shiny Pokemon in a Tera Raid, there will be no indicator that this Pokemon is shiny (no sparkles or sound), and the raid will always have the shiny Pokemon in it if you exit. As long as you exit out of the raid before beating it and save the game with the crystal still on the map, the Tera Raid will remain in your game until the raid is beaten and the game is saved or your raids reset (at midnight or by connecting online to get the current events). Make sure you have autosave off if you plan to host the raid multiple times.
If you plan to host the raid online, the best way to ensure you don't get a temporary ban from online features is to actually do the raid, catch the Pokemon, and then without saving, close and re-enter your game once you leave the Tera Raid. You can restart your game sooner but this is the best way to ensure you can host the raid multiple times.
In general, it's best not to mess with the clock if you want to host shiny Tera Raids, but if your clock strikes midnight and your game resets your outbreaks, close out of your game, set the clock back to the date you found the Tera Raid, and the Tera Raid should be there when you re-enter the game.
If there are any current events raids/outbreaks in your game when you have the shiny Tera Raid, make sure you know when it ends, because if you connect online once those events have ended, your game will reset all raids and outbreaks and you will lose your shiny Tera Raid. Similarly, if you connect online while there are event raids/outbreaks that weren't in your game when you found the Tera Raid, you will lose your shiny Tera Raid.
To answer the specific questions I asked in the question, all clock based resets happen as soon as you hit the OK button in the Date and Time section while changing the clock, regardless of if you actually change anything. Most of the time, your raids will reset if you hit the OK button regardless of if you are online or not (it isn't 100% consistent). As long as the raids/outbreaks in your game are the same as the ongoing raid/outbreaks, your raids/outbreaks will not reset if you were to connect online, regardless of if you had set your clock to an absurd date. (The one thing I haven't tested is what happens if you have no events, an event happens and passes without your game receiving it, and then you connect online after the event. I'm assuming your raids wouldn't reset if you connect online, but if you aren't sure, it's best not to risk it, and if you need to change the clock, do it while your game is closed.)
Sharing a raid locally is the best way to safely host a raid if you have a second Switch and want to farm the shiny for yourself or share the raid with friends. This way, you don't have to connect online to Poke Portal and there's no risk of losing your raids if there's a current event or if your game has an old event like the Gimmighoul raids.
In general, as the odds of finding a shiny in a Tera Raid are 1/4103.05, you're not likely to come across one yourself, meaning that if you happen to join a shiny Tera Raid online, there's a high chance that these raids are hosted by bots, especially if they have a ludicrous amount of rare rewards (most of these bot hosted raids are technically legal even if they aren't "legit" in the eyes of some players). While some people do genuinely host shiny raids, often times, if you come across one online, it's often too good to be true, if you care about getting fully legitimate shinies. All this to say that if you want to host a shiny Tera Raid, I'd personally recommend you host in a trusted community or farm the Tera Raid and distribute them to people you know would appreciate your shiny, but the choice is yours.
All this advice is pretty much applicable to hosting any Tera Raid (one that has good rewards for example), but regardless, be careful out there and happy hunting!