The two big catches with any method for qualifying for monster classes:

First, it's never made clear what it means to "be a _____", so it's not clear just which form-changing magics grant that quality. You can certainly take on the form of a beholder or illithid or whatever, but is the form all it takes?

Second, it's also never made clear at what point you gain that creature's LA. It wouldn't be unreasonable to assume that it's at the same point that you count as being one. In which case, you might be able to make yourself eligible to take Beholder Mage levels, but since a beholder has an LA of --, doing so is pointless, as you'll have lost any way of leveling up to take the class, short of DM fiat.