This was the question that drove people to assume the existence of 'luminiferous ether' (literally, light bearing background substance) in the 19th century. Wikipedia actually has a [pretty decent discussion](https://en.wikipedia.org/wiki/Luminiferous_aether
) of the history of the idea and how it was abandoned.
What you're doing is assuming that because the same mathematics applies to electromagnetism and waves in media, there should be deeper analogies between them. But let's look at how we actually interact with both situations. For waves in a medium, such as water, we can see the height of the water throughout and find that the height obeys a wave equation.
But what about electromagnetism? Fundamentally, all of electromagnetism is about the fact that when I wiggle a charged particle over here, a charged particle over there wiggles as well. That's it. But when we carefully map out how the wiggles work, we find that the most convenient way to keep track of it is to invent something we call the electromagnetic field that obeys wave equations. But we must not confuse our bookkeeping device with displacements of some medium that we observe.