No. The Phantom (Erik) is a fictional character from Gaston Leroux's 1910 novel The Phantom of the Opera, set in the Paris Opéra. He has no historical connection to Persia or any Shah.
The novel does mention his backstory: Erik worked as a contractor in Persia, building palaces for the Shah—a detail that explains his architectural genius and knowledge of secret passages. But this is backstory, not narrative present. He did not "build for the Shah" within the story's action.