The original text of Article II states:
In Case of the Removal of the President from Office, or of his Death, Resignation, or Inability to discharge the Powers and Duties of the said Office, the same shall devolve on the Vice President
This was interpreted by many to mean "powers and duties" shall devolve, but John Tyler took the reins of power forcefully after Harrison's death, even taking the oath of office, pretty much setting the precedent that the VP becomes President, finally formalized in the 25th Amendment.
Article I, Section 3, also hints that the Vice President was only intended to act as President:
The Senate shall chuse their other Officers, and also a President pro tempore, in the absence of the Vice President, or when he shall exercise the Office of President of the United States.
We've never had a precedent for double-vacancy, although we came close in 1973 with the growing Watergate scandal and the resignation of Agnew. Carl Albert, at the time, said that if Nixon resigned or was impeached before a new VP could be named, he would only serve as Acting President until Congress could call a special election as hinted at under Article 2, Section 1. Pelosi could follow that procedure, or do what she wants.
There is no precedent to follow, and if she found herself in that position what she ended up doing could, like John Tyler back in 1841, decide what actually happens in the future. If she takes the Oath and starts referring to herself as "President," she would then be full president
de facto if not
de jure. Since the Presidential Succession Act does not require a special election (in fact, it all but rules them out saying that the Speaker may act as President for the remainder of the term), and since she would be wholly within her rights under the Constitution to exercise the powers of the office no matter what she called herself, it wouldn't even be something worth litigating. If she called herself the President, she would be President. If she called herself Acting President, then she would be Acting President.