When translating Sefer D’varim, it can be difficult at times to figure out where to put opening and closing quotation marks, as it’s not always easy to figure out who is doing the talking and whose words are being quoted. Generally speaking, most of the words of Sefer D’varim are Moshe’s (with G-d telling him to write them down and include them in the Torah, see Abarbanel’s introduction to Sefer D’varim), and since they are introduced as such, most of the Sefer would be contained within quotation marks, albeit with several closing and opening quotation marks whenever Moshe’s words are “interrupted” by narrative. It gets even more complicated when Moshe quotes someone else, including when he quotes G-d, as then there are quotation marks within quotation marks, to the extent that if I were to translate the Torah, I would consider color-coding the text in order to keep track of whose words are being quoted (including when the Torah is speaking in its “narrator’s voice”).
Parashas Ha’azinu is no exception, as in the “song” that G-d told Moshe to teach the nation Moshe refers to himself in the first person (e.g. “I will speak” and “the words of my mouth,” 32:1, and “for G-d’s name I will call,” 32:3), he refers to G-d in the third person (e.g. “His ways,“ 32:4), and he quotes G-d speaking in the first person (e.g. “I will hide My face from them,” 32:20, and “there are no other deities with me,” 32:39). Sometimes, the transition is obvious. For example, when it says, “and He said ‘I will hide my face from them” (32:20), Moshe was saying explicitly that he is now going to start quoting G-d (“and He said”). However, when G-d is mentioned again by name (32:27, 32:30 and 32:36), it is unclear whether G-d is still doing the talking and referring to Himself by His own name, or there was an unannounced transition back to Moshe doing the talking (and referring to G-d). Since afterwards G-d again refers to Himself in first person (32:34/35 and 32:39-42), if there were any unannounced transitions, there must have been additional unannounced transitions in-between. Let’s take a closer look at where any such transitions take place (and why).
It’s clear, based on his referring to himself in first person and to G-d in third person, that Moshe is doing the talking from 32:1 through 32:19. 32:20 starts with Moshe saying “and He said,” from which point he quotes G-d. In 32:29, G-d refers to what our enemies should have been thinking (or, according to some, what we should have been thinking, which impacts which “rock” in 32:31 should be capitalized), so that 32:30-31 is a hypothetical quote (of what should have been thought) within a quote (of G-d) which is itself within a quote (of Moshe), that was introduced by the Torah (31:30). Although there are no pronouns in 32:32-33, this description of punishment is an explanation of what G-d had said (in 32:26) He would do (see Rashi), and is also referred to by G-d (speaking about Himself in first person) in the verse that follows (32:34), so 32:32 through 32:35 are a continuation of G-d’s words. G-d is referred to in the third person again (“His nation”) in 32:36, so somehow, and for some reason, Moshe “interrupts” G-d here, but the introductory “and said” in 32:37 could signal a continuation of G-d’s words (see Rashi). Alternatively, Moshe’s interruption continues through 32:38 (since G-d refers to Himself in first person again starting in 32:39) with Moshe quoting our enemy in 32:37-38 (see Ibn Ezra and Ramban). [There need not be a reintroduction to tell us that it is G-d speaking again in 32:39, as it is rather explicit.] G-d’s words continue through 32:42, with this being the end of Moshe quoting Him (in the “song”). In 32:43 Moshe closes the “song” and once again refers to G-d in third person. The question (as far as who said/thought what) remains, though, regarding Moshe’s “interruption” of either one verse (32:36) or three verses (32:36-38). Why were these ideas conveyed by Moshe, smack in the middle of G-d talking, rather than coming directly from G-d Himself?
[Although Moshe might have wanted to soften the blow, so after quoting what G-d would do to His nation when they sinned he (Moshe) reassured them that despite G-d “judging” them He would, at the last moment — when all hope seems lost — relent, and then turn His attention to punishing the other nations instead, we would still need to understand why this message had to come from Moshe, and not from G-d Himself.]
One possibility is that knowing we would never be completely lost minimizes the impetus to stay loyal to G-d (even if it’s only the nation as a whole that wouldn’t be lost; individuals who abandon G-d could still be), and this “softening of the blow” isn’t as “soft” coming from Moshe as it would have been had it come directly from the One who will punish us. However, this only applies to one part of 32:36, not the entire verse, or to the next two verses (if they are also part of Moshe’s “interruption”).
The method that G-d uses to punish us is usually not by directing a decree against us, but by removing His divine protection from us and letting the destructive forces He created (whether part of the natural world or the hatred of other nations) hurt us. As G-d Himself warned, “I will hide My face from them” (32:20), i.e. no longer protect them from what would have, until now, harmed them had I not been preventing it from happening. [I am convinced that G-d set the world up this way specifically to strongly encourage us to become attached to Him in order to be worthy of His divine protection.] It is therefore possible that the reason the part of “G-d judging us” (and what it encompasses, including the other nations asking where G-d is that such devastation was allowed to happen to us) is not said by G-d Himself precisely because the punishment being referred to is not administered directly by G-d, but occurs because He removes His divine protection, thereby allowing it to happen. The direct punishment is G-d removing His protection from us; the result is a byproduct of no longer being protected by Him. Since the result comes indirectly, it isn’t G-d Himself who mentions that He will do it, but Moshe.