These are the words that Moshe spoke to all Yisrael…
If we accept the simple sense of this pasuk, we are looking at a very great miracle. In a nation of 600,000 prime-age adult men, the total population must have reached the millions. Yet Moshe was able to speak to all of them at once! There is no way to understand this, other than to attribute it to a miracle.
Yet perhaps there is another way of looking at the pasuk. Rebuking people is a risky business – especially a large group of people. Some listeners are offended. Others offer stiff resistance, sometimes consciously, sometimes not. The worst will turn on the person offering the criticism, and call him a hypocrite, whose own shortcomings are worse than those whom he chastises.
Moshe was prepared for a difficult job. He made the strategic decision to present his rebuke in a manner that would generate the least pushback. He knew that he was living the last days of his life. He could not afford to fail. There would not be another opportunity to get it right.
In general, you can offer a gentler, kinder rebuke by holding forth on the evils of particular actions, without stating that those listening were guilty of those actions. You speak in general, without staring down the individual offender. Moshe decided that he would speak about failings of the nation as a whole, without pointing fingers at particular perpetrators.
The Torah hints at this at the very source of the mitzvah of rebuke: “You shall reprove your fellow. Do not bear a sin because of him.” The last phrase can also be understood as, “Do not place the bearing of sin directly upon him.” In other words, reprove him, if possible, without having to look him in the eye and telling him about his crimes.
Moshe’s words were addressed to a lofty group. The sinners at every turn of the previous forty years in the wildnerness were a minority element, presumably not the most spiritually accomplished of the nation. (Keep in mind that the worst sinners in the case of the Golden Calf only numbered 3000. Similarly, the number of people involved in the Korach rebellion was relatively small.) Moshe was determined to give mussar. He understood the disadvantages of locating the actual sinners, and giving individual dressings-down. He would cause pain, and he would encounter resistance. Instead, he decided to speak about the events that happened to the nation. He would include the guilty and the non-guilty in the same group.
This, then, is what our pasuk means. Moshe addressed the actual sinners by speaking “to all Yisrael” – by speaking about the behavior of the nation as a whole, allowing people to make the application to themselves if they were ready to hear it.