The required rebuke
שובה ישראל עד יקוק אלקיך כי כשלת בעונך
Return, Israel, to Hashem your G-d! For you have stumbled in your sins
The first Midrash in parshas HaAzinu seems to have a completely irrelevant halachic query. What’s the law if someone has some sort of ear ailment on Shabbos? Is it permissible for them to seek medical help? The Midrash answers that our Sages taught us that preservation of life overrides Shabbos. This back and forth sounds like some sort of cryptic riddle. What’s it alluding to? Is there some relevance to the time period that we find ourselves in?
There’s a discussion amongst the halachic authorities if it is permissible to recite Vidui, the confession of our sins, on Shabbos. On the one hand, if someone feels guilty and recites Vidui, it will cause a relaxation effect. They’ll feel a sense of relief. That should then be permissible on Shabbos, which is a meant to be a day of relaxation and rejuvenation. However, reciting Vidui can also cause anguish, which is to be avoided on Shabbos. According to this latter reasoning, a community Rabbi should be forbidden from rebuking his congregants on Shabbos. True, he’s obligated to ensure they follow the correct path, but causing them pain and anguish on Shabbos is to be avoided.
Nevertheless, this is not true on Shabbos Shuvah. The Shabbos that inevitably falls between Rosh Hashanah and Yom Kippur is called Shabbos Shuvah. It is part of the Ten Days of Repentance. The significance of Shabbos Shuvah is it’s an opportunity, not to be missed, to repent for all the Shabboses that occurred throughout the year. If so, if the community Rabbi doesn’t rebuke the congregants now, the people might not take advantage of the day. This is a matter of life and death, in the spiritual sense. Since preservation of life overrides the Shabbos, he is permitted to rebuke them on Shabbos Shuvah.
We can learn this from Moshe’s behavior in this week’s parsha. According to some sources, he died on Shabbos. It was on his last day of life that he recited the song of HaAzinu. It contains prophetic insights into the Jewish people’s past, present, and future. Verses that seem merely poetic often convey deep concepts. It is full of words of rebuke to the people, emphasizing their failures and where they can improve. He knew this was his last chance to set the people straight. Even though it was Shabbos, he rebuked the Jewish people. Preserving their spiritual lives took precedence.
Perhaps this is the intent of the Midrash we started with. What’s the law regarding someone who has an ear ailment? It doesn’t mean that they’re literally ill. Rather, the person is hearing something they’d rather they didn’t. They’re being told words of rebuke on Shabbos. Is it permissible for them to hear these words, if the intent is to set them straight? Are they going to be “healed” from what they’re hearing? If they don’t hear this now, are their spiritual lives in danger? The answer is yes; saving a life takes precedence over Shabbos.
Good Shabbos and Gemar Chasimah Tovah
 Based on Chasam Sofer’s Toras Moshe I parshas HaAzinu s.v. איתא במדרש
 Hosea 14:2, the first line of the haftarah for parshas HaAzinu when it falls between Rosh Hashana and Yom Kippur. This is where this Shabbos got the name “Shabbos Shuvah”
 Devarim Rabbah 10:1
 Shabbos 132a
 The Midrash as we have it says ספק פיקוח נפש, but the Chasam Sofer only quotes it as פיקוח נפש. In Chasam Sofer Al HaTorah parshas HaAzinu s.v. ברבה he cites it as we have it. See note 12 how it can make a difference in interpreting this Midrash
 Teshuvos Maharam Mintz § 87, brought by the Magen Avraham to Orach Chaim 288:6 § 11 and Shulchan Aruch HaRav ad. loc. § 8, permits reciting Vidui on Shabbos. In contrast, the Mishnah Berurah ad. loc. § 7,22 with Sha’ar HaTziyun § 21 permits it only when conducting a Ta’anis Chalom, but not otherwise. He cites this from Seder HaYom Seder Kabbalas Shabbos UTefillas Arvis. See LeDofkei BaTeshuvah on Mishneh Torah Hilchos Teshuvah 1:1 § 14 for more on this dispute
 In Chasam Sofer Al HaTorah he cites from the Shela HaKadosh that Vidui is permissible for someone performing sincere repentance, as it provides them with a sense of relief. I found in Shenei Luchos HaBris Maseches Shabbos § 48 that he simply quotes the Seder HaYom loc. cit., who says someone fasting a Ta’anis Chalom will feel relief from their repentance and Vidui. However, I couldn’t find exactly what the Chasam Sofer was quoting. What’s interesting is the Shela also says that it’s permissible to say Vidui on Shabbos because of פיקוח נפש, like the Chasam Sofer is about to explain. The Shela however says it’s permissible on every Shabbos, for the same reason as in note 12
 See Shabbos 54b
 The Chasam Sofer cites this from “sefarim”. This idea was made famous by the Mishneh Berurah 603:1 § 2, who cites it from the Yearos Devash 1:1. Although, the latter applies this idea to all seven days between Rosh Hashanah and Yom Kippur. The Chasam Sofer himself says this in Derashos Chasam Sofer III p. 40 col. 2. A work that was probably published before Yearos Devash which says this idea is Bigdei Yesha 596:1 by Rav Yeshayahu Weiner, who cites this idea from מפה הקדוש אדונינו מורינו ורבינו הגאון הגדול חסיד המפורסם רבן של כל בני הגולה והמקום יהיה בעזרו אב”ד ור”מ דקהלתינו יע”א. I’m not sure who he’s referring to, or what the last three letters stand for. I wanted to say he’s referring to Rav Yonasan Eibeshitz, who authored the Yearos Devash, but I’m not sure what the ע stands for. In any event, whoever he is quoting cites this idea by saying כך כתוב בכתבי הר”י. It could be this is referring to the writings of the Arizal, and this is what the Chasam Sofer meant by “sefarim”
 אם לא עכשיו אמיתי (Avos 1:14)
 The Chasam Sofer doesn’t specify if he’s referring to physical or spiritual life/death. He seemingly means spiritual, but it could also be true in the physical sense, as a person’s fate is sealed on Yom Kippur, if it wasn’t already on Rosh Hashanah. This is true according to the Ran to Rosh Hashanah 3b (in the pages of the Rif) s.v. צדיקים גמורים, who says that the judgement on Rosh Hashanah is focused on a person’s Earthly life. He brings this from Rav Yitzchak of Trani, who also says this in his Tosafos Rid ad. loc. The Ramban also says this in Toras HaAdam Sha’ar HaGemul. Cf. Tosafos to Rosh Hashanah 16b s.v. ונחתמין, who say the judgement on Rosh Hashanah is focused on a person’s afterlife
 In Chasam Sofer Al HaTorah, he says differently. He says that for sure it is permissible to rebuke those who enjoy rebuke and will be glad to repent. However, the Midrash we started with is teaching us that even someone who doesn’t enjoy rebuke should hear it. This is because ספק פיקוח נפש דוחה שבת. Sure, we could wait until after Shabbos to rebuke them. However, who knows what tomorrow will bring? A person should always repent a day before their death (Avos 2:10). Therefore, since there’s even a possibility of a loss of life, the rebuke would override Shabbos. This is true for any Shabbos
 Sotah 13b with Rashi s.v. דיו; Zohar II parshas Terumah p. 156a; Tosafos to Menachos 30a s.v. מכאן; Rokeach Hilchos Shabbos § 56; Piskei Rosh Pesachim 10:13. See there where the Rosh asks on this from Devarim Rabbah 9:9 (it also appears in Midrash Tehillim § 90) that Moshe on the day of his death wrote thirteen Torah scrolls, which would have been prohibited on Shabbos. Tosafos and the Rosh point out that from Seder Olam Chapter 11 it sounds more like he died on a Friday (for some reason the Chasam Sofer says that the Rosh brings that Seder Olam says he died on Shabbos). However, see Teshuvos Chasam Sofer 6:29 who brings from the Shela HaKadosh that Moshe could have written these on Shabbos ע”י שם והשבעת קולמוס. Minchas Asher Shemos § 9 says (in the name of the Chasam Sofer) that this is more reasonable than to suggest he physically wrote thirteen scrolls in one day, which seemingly would be impossible without a miracle. Nevertheless, elsewhere Rav Asher Weiss asks that ostensibly these Torah scrolls should be disqualified, as they weren’t written by hand (however, see Minchas Asher, where he previously held that they’re valid). Alas, I was unable to find the Shela that the Chasam Sofer cites. I only found that in Shenei Luchos HaBris Vavei Amudim Chapter 20 § 16 he addresses the question, but with a completely different answer. See there, as well as Korbon Nesanel ad. loc. § 20, who writes somewhat similarly