And US will drastically escalate if Pelosi is killed. No nukes were used back in the Cold War. No nukes are used now even though Ukraine has killed tens of thousands of Russian troops, mostly with US supplied weapons and intelligence.
No, knowing who controls world media today, China will be painted as the bad buy. People would be crying bloody murder, and there would likely be sanctions and condemnations. China's allies would likely want to remain out of this mess or put out symbolic statements that don't mean nothing.
They will escalate but all out war is unlikely simply because even they themselves know their chances are poor.
US own domestic audience opinion is invalid, no one cares because it is already presumed they're all brainwashed to begin with, they're the "secure base" who will always just follow the US Government orders, so China can't lose them as a base.
China's allies will only stay out of it to deescalate the situation if China tells them to. If US tries calling in any of their allies, all bets will be off and China will call in everyone as well. Even countries that aren't directly allied with China now will almost certainly join because they all realize that if China is defeated, they'll spend eternity under the US jackboot, so its either fight now for your life or get picked off one by one by an unstoppable US world conquest later.
As far as I see, if China kills Pelosi for illegally entering their territory, US will give China the toughest sanctions they can give without collapsing their economy. But that will naturally also strain US more than China in the long term, so it isn't a horrible trade off.
Beside the Cuban missile crisis, this could also be seen as a similar moment to the US sponsored riots in 1989. Back then, US dared China to shoot its men, and China opened fire, killing many US sponsored scum, making America outraged. Afterwards, America tried to sanction China but could not do too much due to China's role in the world economy. However, the decades after 1989, China's growth was particularly great, because they showed to the world that they stood up to American attempts at controlling the world, and therefore they're a reliable partner. Obviously, no western press will dare to say this openly, but that was the last time America was forcefully repelled, and it was a positive impact to Chinese foreign policy.