Given that Mewni is matrilineal in the Butterfly line, Shastacan is a king in name only.
He is, regarding the throne, a prince consort to Eclipsa, the direct heir and queen of Mewni.
After her removal from the throne, she would be succeeded by her daughter, a sister, aunt, cousin or the likes. But never her husband.
He would only be the child's caretaker and stand-in until the new queen is of age.
So, if Meteora was found not eligible for the throne due to her father being a monster, one of Eclipsa's female relatives would be next in line (no surprises there, all monarchies have giant charts tracking who is at what place in line to what title).
In either case, Shastacan is way out of line and broke succession law as no verdict of any kind was ever made on Meteora's eligibility. Although he must have brought in a Butterfly child of the magic lineage or Festivia would have been found out quickly.