The way the directors of elections get around this is to destroy the chain of custody before the court can rule, either comingling the ballots with legitimate ones, or throwing out the envelopes that contain the signatures.
The options left to the legislatures are to either accept it (roll over one more time), or assert their power and declare the result tainted beyond repair and appoint the electors directly. This would be an extreme last-resort action, and not one that I would recommend when the process plays out normally.
When faced with the prospect of a legislature-directed slated of Electors or no Electors at all, on what side of that argument would SCOTUS land?
If my scorched earth scenario plays out, the better result for Democrats is for SCOTUS to deny the legislature and keep Pennsylvania's chaos from certifying in time for safe harbor. Then, the election either falls to the House to decide or the Democrats "find" a faithless elector to switch to Biden.
-PJ
I must admit I’ve been thinking about House of Rep. state party delegation numbers for the past 24 hours.