Some laws are true by definition. Like 'A = A'. This is not a theory, it is the law of identity and is only a bullet proof Law because of the definition of '='. The inverse square law also must be true because it is a logical consequence of the math. There are many other laws in math that are true by definition.
Other laws were prematurely labeled a law when they were actually a theory. Such as "Newton's Law of Gravitation", which is listed in the 'Scientific laws named after people" link you posted. Newton's Law of Gravitation was prematurely labeled a law and later replaced by Einstein's Theory of General Relativity. If it were an actual Law, it could never be replaced. As the scientific method has become a standard in science, the word theory is used now rather than law.
DrBaltar, you are also using the word "theory" in a way that's different from how it's actually used by physicists. I too, have at some point been told that a theory is something that's believed to be true because there's some evidence to support it, and that if the evidence is weaker it's a hypothesis. But that's
not how those words are used by physicists!
For example, in any introductory text on quantum field theory, you will find something called Klein-Gordon theory. This theory describes a universe with a space-time described by special relativity, where there's no gravity and no interactions at all. The only thing this universe contains is a fixed number of quantum mechanical particles of the simplest possible kind, which never interact with each other or anything else. (That's why the number of particles can never change).
Our universe definitely doesn't look like that, but this model is still called Klein-Gordon
theory. Not Klein-Gordon hypothesis, Klein-Gordon fantasy or even Klein-Gordon model (the last one would actually be appropriate), but Klein-Gordon
theory. This is a good example of how the word is actually used. A theory is just a statement about the properties of a possible universe. As the Klein-Gordon example shows, it doesn't even have to be our own universe.
Since a theory is just a statement, no amount of experimental evidence can change a theory into something else. It will always be a theory, even if it agrees with all the evidence, or disagrees with all the evidence. "The Earth is round" and "The Earth is flat" are both theories.
One more thing: The inverse square law of gravity isn't "a logical consequence of the math", but maybe you meant some other inverse square law, like the fact that luminosity varies with distance from the light source according to an inverse square law. That's just a result derived from the geometry.