You won't find a definition of substance in present days university Physics textbooks. The reason is that the nineteenth century concept of substance has gone through a complete conceptual recasting after the twentieth century discoveries. Nowadays, the old word substance, as a clean scientific concept, is present only in chemistry, but with a much more limited and technical meaning.
Even the related old-fashioned distinction between matter and radiation cannot be considered anymore as a fundamental classification of what is observed and measured in laboratory.
On the basis of concepts from Relativity, Quantum Mechanics and Quantum Field Theory, a more consistent concept is that of physical system. A physical system may or may not have mass, charge, spin, it may be transformed into a different physical system. A physical system should not be confused with its properties (energy, mass, charge are properties and are not physical systems). A physical system can be considered as made of other physical subsystems, accommodating in this way the hierarchical structure of phenomenology at different time, length and energy scales.
Therefore, an EM wave is clearly a physical system.