$E=mc^2$ follows from the fact that the Minkowski metric is $diag(-c,1,1,1)$. This in turn follows from the fact that $c$ is the maximum allowable speed (together with Lorentz invariance). So if you could somehow change the speed of light to, say, $c/2$, while still maintaining $c$ as the maximum allowable speed, then you'd still have $E=mc^2$, not $E=m(c/2)^2$.
(Of course as others have pointed out, a whole lot of other things would have to change too and you can tell different auxiliary stories depending on what you insist on holding fixed.)
On the other hand, if there were a universe in which light still traveled at $c$ but the maximum speed was $2c$, then in that universe the metric would be $diag(-2c,1,1,1)$ and the correct relation between energy and mass would be $E=m(2c)^2$ or $E=4mc^2$. You could describe that by saying in that universe, the energy associated with a given mass is four times what it is in our universe, or you could describe it by saying that in that universe, the mass associated with a given energy is one-fourth what it is in our universe.
If you compare, say, a billiard ball in that universe to a billiard ball in ours, you might be tempted to ask whether their billiard ball has the same mass as ours but more energy, or the same energy as ours but less mass. Either description works equally well, and I very much doubt that there's any meaningful sense in which one description is more "right" than the other.
(There's also probably no meaningful difference between that universe and another where the maximum speed is still $c$ but light travels at speed $c/2$.)
Edited to add: Note that in Minkowski space, there are light-like paths, but that doesn't mean you have to postulate that anything travels along those paths. So you can completely assume away the very existence of light, and you'll still have the relationship $E=mc^2$ just from the geometry. This suffices, I think, to answer the question you're asking.