There is a subtle problem with the comparison you're making. $E = \hbar\omega$ is valid for only one photon/quanta. The correct formula is actually $E = \hbar\omega N$, where $N$ is the number of photons/quanta in question.
This modifies your considerations, some. The classical formula for the energy of a sine wave on a string length $L$ is
$$E = \frac{1}{2}\mu \omega^2 A^2 L,$$
where $\mu$ is the linear density of the string, $A$ is the amplitude of the wave, and $\omega$ is the angular frequency. Now, such waves on strings fall into the realm of sound waves, as I understand it, and so could be said to be composed of phonons. So, we can drop in the quantum mechanic formula to get that
$$N = \frac{1}{2 \hbar}\mu \omega A^2 L.$$
So, it's not so much that the classical and quantum results disagree. In fact, they cannot disagree - the quantum result has to reduce to the classical one in the appropriate limit (see also: the correspondence principle and Ehrenfest's theorem). What's really going on is that the number of quanta that a classical wave contains is also proportional to $\omega$, and that's what eats the second factor of $\omega$.
A bunch more gory details and formulae follow.
For the simple harmonic oscillator (SHO) the energy above the ground state is given by
\begin{align}
E & = \frac{p^2}{2m} + \frac{m\omega^2}{2} x^2 - \frac{\hbar\omega}{2} \\
& = \hbar\omega n,
\end{align}
implying $n = \frac{p^2}{2m\hbar\omega} + \frac{m\omega}{2\hbar}x^2 - \frac{1}{2} = \frac{m\omega}{2\hbar} \left(x - \frac{i}{m\omega}p\right)\left(x + \frac{i}{m\omega}p\right)$ (remember that in QM $[x,p] = xp - px = i\hbar$).
For a real free scalar field that obeys the Klein-Gordon equation classically, you get that
\begin{align}
E &= \int \frac{c^2}{2}\pi^*(\mathbf{k})\pi(\mathbf{k}) + \frac{\omega^2}{2c^2}\phi^*(\mathbf{k})\phi(\mathbf{k}) - \frac{\hbar \omega}{2} \delta^{(3)}(0) \,\mathrm{d}^3k \\
&= \int \hbar\omega \mathcal{N}(\mathbf{k})\,\mathrm{d}^3k,
\end{align}
where $\mathcal{N}(\mathbf{k})$ is the operator that gives the density of quanta/particles per cubic wave-number (we call it the density per mode), and $\omega = c\sqrt{k^2 + m^2c^2 / \hbar^2}$. Note also that $\pi^*(\mathbf{k})$ is the field momentum canonically conjugate to $\phi(\mathbf{k})$, so $[\phi(\mathbf{k}),\pi^*(\mathbf{k}')] = i\hbar \delta^{(3)}(\mathbf{k}-\mathbf{k}')$ (hence the delta function representing the vacuum energy). The complex conjugates are there because $\phi(\mathbf{x})$ is a real function, so its Fourier transform, $\phi(\mathbf{k})$, is complex. Like with the SHO we get
\begin{align}
\mathcal{N}(\mathbf{k}) &= \frac{c^2}{2 \hbar\omega}\pi^*(\mathbf{k})\pi(\mathbf{k}) + \frac{\omega}{2\hbar c^2}\phi^*(\mathbf{k})\phi(\mathbf{k}) - \frac{\delta^{(3)}(0)}{2} \\
&= \frac{\omega}{4\hbar c^2}\left(\phi^*(\mathbf{k}) - \frac{ic^2}{\omega}\pi^*(\mathbf{k})\right)\left(\phi(\mathbf{k}) + \frac{ic^2}{\omega}\pi(\mathbf{k})\right) + (\text{same with }\mathbf{k}\rightarrow -\mathbf{k}).
\end{align}
Note how $\mathcal{N}$ is proportional to $\omega$. Keep in mind that the momentum amplitude for $\pi(\mathbf{k})$ is $\omega$ times the ordinary amplitude for $\phi(\mathbf{k})$, and that result will hold quantum mechanically, too (see: Heisenberg picture equations of motion).
All of that builds up to the electromagnetic field. The Electromagnetic field is considerably more complicated due to the need to fix a gauge and the vector calculus. The Energy is given by:
\begin{align}
E & = \int \frac{\epsilon_0}{2} \mathbf{E}(\mathbf{k})\cdot\mathbf{E}(\mathbf{k}) + \frac{1}{2\mu_0} \mathbf{B}(\mathbf{k})\cdot\mathbf{B}(\mathbf{k})\,\mathrm{d}^3k \\
& = \int \frac{\epsilon_0}{2} \mathbf{E}(\mathbf{k})\cdot\mathbf{E}(\mathbf{k}) + \frac{1}{2\mu_0} \left[\mathbf{k}\times \mathbf{A}(\mathbf{k})\right]\cdot\left[\mathbf{k}\times \mathbf{A}(\mathbf{k})\right]\,\mathrm{d}^3k.
\end{align}
Perhaps the simplest gauge to work in is the Weyl gauge, where the scalar potential is identically zero. Then you get that $\mathbf{E} = - \partial_0 \mathbf{A}$. The gauge fixing has removed one of the degrees of freedom. The remaining three can be broken down using Helmholtz decompositon in real space (in momentum space this amounts to breaking down a vector field into components parallel to $\mathbf{k}$ [radial/divergenceful] and perpendicular [tangential to the polar coordinate sphere/solenoidal]).
Notice how $\mathbf{A}\cdot\hat{k}$, the divergenceful part of the vector potential, doesn't contribute to the energy (it had better not - this is the part of $\mathbf{A}$ that gauge transformations modify). The only contribution to the energy in the radial direction is the divergenceful part of $\mathbf{E}$, which is proportional to the negative of the momentum canonically conjugate to the divergenceful part of $\mathbf{A}$. In other words, that part of the field is 'free', and doesn't support quantized particle modes. Instead the modes are like the travelling wave modes we dealt with in the free Shcrödinger equation (i.e. when $H = p^2/(2m)$).
If we denote the solenoidal part of a vector field $\mathbf{A}(\mathbf{k})$ with $\mathbf{A}_\perp(\mathbf{k})$ and the divergenceful part with $A_{||}(\mathbf{k})$, then the energy can be written:
\begin{align}
E & = \int \frac{\epsilon_0}{2}E_{||}^*(\mathbf{k}) E_{||}(\mathbf{k}) \,\mathrm{d}^3k \\
& \hphantom{=} + \int \frac{\epsilon_0}{2} \mathbf{E}_\perp^*(\mathbf{k}) \cdot \mathbf{E}_\perp(\mathbf{k}) + \frac{1}{2\mu_0} k^2 \mathbf{A}_\perp^*(\mathbf{k}) \cdot \mathbf{A}_\perp(\mathbf{k}) \,\mathrm{d}^3k \\
& = \int \frac{\epsilon_0}{2}E_{||}^*(\mathbf{k}) E_{||}(\mathbf{k}) \,\mathrm{d}^3k + \int \hbar\omega \mathcal{N}(\mathbf{k})\,\mathrm{d}^3 k.
\end{align}
The remaining trickiness is in terms of translating the symbols as used above. The dictionary is, roughly: $\pi \rightarrow -\sqrt{\epsilon_0} \mathbf{E}_\perp / c$ and $\phi \rightarrow \mathbf{A}_\perp / \sqrt{\mu_0}$. This gives:
\begin{align}
\mathcal{N}(\mathbf{k}) & = \frac{\epsilon_0}{2\hbar \omega} \mathbf{E}_\perp^*(\mathbf{k}) \cdot \mathbf{E}_\perp(\mathbf{k}) + \frac{\omega}{2\hbar\mu_0 c^2} \mathbf{A}_\perp^*(\mathbf{k}) \cdot \mathbf{A}_\perp(\mathbf{k}) - \delta^{(3)}(0) \\
& = \frac{\epsilon_0}{2\hbar \omega} \mathbf{E}_\perp^*(\mathbf{k}) \cdot \mathbf{E}_\perp(\mathbf{k}) + \frac{\omega \epsilon_0}{2\hbar} \mathbf{A}_\perp^*(\mathbf{k}) \cdot \mathbf{A}_\perp(\mathbf{k}) - \delta^{(3)}(0) \\
& = \frac{\omega}{4\hbar c^2}\left(\frac{\mathbf{A}_\perp^*(\mathbf{k})}{\sqrt{\mu_0}} + \frac{ic \sqrt{\epsilon_0}}{\omega}\mathbf{E}_\perp^*(\mathbf{k})\right)\cdot\left(\frac{\mathbf{A}_\perp(\mathbf{k})}{\sqrt{\mu_0}} - \frac{ic \sqrt{\epsilon_0}}{\omega}\mathbf{E}_\perp(\mathbf{k})\right) \\
&\hphantom{=}+ (\text{same with }\mathbf{k}\rightarrow -\mathbf{k}) \\
& = \frac{\omega \epsilon_0}{4\hbar }\left(\mathbf{A}_\perp^*(\mathbf{k}) + \frac{i}{\omega}\mathbf{E}_\perp^*(\mathbf{k})\right)\cdot\left(\mathbf{A}_\perp(\mathbf{k}) - \frac{i}{\omega}\mathbf{E}_\perp(\mathbf{k})\right) + (\text{same with }\mathbf{k}\rightarrow -\mathbf{k}).
\end{align}
Note that the loss of the $2$ in the denominator of $\delta^{(3)}(0)$ is not a mistake - there are two independent components in $\mathbf{A}_\perp$, and each one contributes a $\delta^{(3)}(0)/2$.