Why does classical physics imply every mode of vibration should have the same thermal energy?

This classical prediction comes from the equipartition theorem of statistical mechanics, though I have some issues with exactly how the statement you quote is worded.

The equipartition theorem is for describing how the energy gets distributed in a system with many degrees of freedom. For example, consider a mono-atomic ideal gas, like helium, that you've heated up to some temperature $T$ (in absolute units). If you increase the energy stored in the gas --- maybe you compress the gas, doing work on it --- the only degree of freedom available to store that energy is that the velocities of the gas particles can change. The energy of each gas atom is $\frac12 m v^2 = \frac12 m (v_x^2 + v_y^2 + v_z^2)$, where the $v_i$ are the components of the velocity in some coordinate system. But if the container is symmetrical, then there shouldn't be any reason for, say, the $x$-components of the gas velocities to have systematically more energy than the $y$-components: the energy should be partitioned equally among all three components.

The equipartition theorem predicts, among other things, that all monoatomic ideal gases should have the same molar heat capacity $C_V = \frac32R = 12\,\frac{\rm joule}{\rm mole\ kelvin}$, because each atom in the gas has (on average) kinetic energy $\frac12 kT$ in each of the three possible directions of travel. Furthermore because the gas speeds obey $\frac12 mv^2 = \frac32 kT$, then it's possible to make predictions about the speed of sound in different gases at different temperatures.

The equipartition theorem isn't only about speeds, but about all sorts of degrees of freedom. For instance, if you have a diatomic gas, like carbon monoxide, there is an1 additional way that the gas molecules can store energy: rotation. Each molecule has two possible axes of rotation perpendicular to the bond between the two atoms. Equipartition predicts those two extra degrees of freedom should also each store average kinetic energy $\frac12 kT$. So diatomic ideal gases should have molar heat capacity $5R/2$. Which they do --- except at very low temperatures, when the heat capacity falls back to the monoatomic value of $3R/2$. This behavior was also a mystery at the beginning of the twentieth century.

In the case of blackbody radiation, the oscillators in question aren't electrons, but standing waves in the electromagnetic field. (Electrons may be involved, but the electromagnetic field can oscillated even if all the charges in the universe are far away.) If you consider the electromagnetic field inside of a metal box, where the magnitude of the field always has to be zero in the walls of the box, then you can count these modes the same way we counted translational and rotational modes for the ideal gases. There's a mode where half a wave fits in the box, so there are nodes at the walls of the cavity; a mode where one wave fits in the box; a node where one-and-a-half waves fit in the box; and so on to infinity. And according to classical equipartition, each of these infinite possible oscillatory modes should contain, on average, an energy of $\frac12 kT$.

You can sample these electromagnetic oscillators by building such a cavity, making it hot, and opening a small hole to look at the radiation that comes out (on the assumption that a small hole doesn't change what's happening inside the cavity very much). Your eye interprets the different wavelengths/frequencies of electromagnetic radiation as different colors. And what you find is that, for long wavelengths/slow frequencies, equipartition gives a pretty good prediction for the spectrum of light emitted by a hot cavity. The trouble, as your text points out briefly, is that continuum equipartition doesn't have any mechanism for omitting the short wavelength/rapid frequency oscillations, and therefore predicts that empty space should have an infinite heat capacity. The ideal gas predictions were ... less wrong than this. In the literature, this misprediction is called the "ultraviolet catastrophe."

Planck's suggestion was that the minimum energy you can add to an oscillator with angular frequency $\omega$ is $E = \hbar \omega$. Given that assumption, classical thermodynamics predicts that the probability of finding an oscillator with $n$ lumps of energy is proportional to $e^{-n\hbar\omega/kT}$. If the temperature is hot or the frequency is slow, these probabilities are all proportional to $e^{-\text{small}} \approx 1$, and there's no real restriction on adding or removing energy from that degree of freedom, and the equipartition theorem holds. But if the frequency is fast or the temperature is cold, then the probability of finding your oscillator with one lump of energy is much smaller than for finding it with zero, and we can say that the degree of freedom is "frozen out."

Note that, so far as we know, Planck's assumption applies to all oscillators, not just the electromagnetic field in a hot cavity. For instance, the reason that a cold diatomic gas has the same molar heat capacity as a monoatomic gas (the $\frac52\to\frac32$ business from eariler) is that the rotational degree of freedom freezes out.

1 "an additional way that gas molecules can store energy": For simplicity, I'm ignoring gas vibrational degrees of freedom in this answer that's nominally about blackbody radiation. Generally, vibration freezes out at a higher temperature than rotation does, and for many diatomic gases the vibrational modes aren't completely accessible before dissociation starts to be significant. In the carbon monoxide example, the heat capacity is $\frac52R \pm 1\%$ from far below room temperature to about 400K; the vibration temperature is about $\hbar\omega/k = 3000\rm\,K$, about twice the dissociation temperature.

There is so called equipartition theorem in classical statistical physics that says that under some conditions all degrees of freedom have the same average energy if the temperature is fixed. The degrees of freedom of electromagnetic field satisfy those conditions, and there is an infinite number of such degrees of freedom (frequencies can be arbitrarily high). This is the source of the ultraviolet catastrophe . I am not sure about vibrations of electrons. I would think electrons in classical physics have a finite number of degrees of freedom.