Jonathan Walters gave the visitors an early lead when he reacted smartly in the box to poke home from close range on nine minutes after his header had been blocked.
Sunderland had a player sent off for the second week running when Craig Gardner was shown a straight red card for a lunging, studs-first tackle on Charlie Adam with only 33 minutes on the clock.
Stoke looked to be cruising to victory in a one-paced and slightly subdued encounter before defender O'Shea equalised after 63 minutes when he shifted his balance quickly to side-foot home a dangerous Sebastian Larsson corner at the far post.
Sunderland climbed to 15th, level on 38 points with north-east rivals Newcastle United and Norwich City and three clear of Wigan Athletic who are in the relegation zone but have a game in hand.
"In some way we are a masochistic team," said new Sunderland manager Paolo Di Canio who also watched Stephane Sessegnon being sent off against Aston Villa last time out.
"It is a massive point for us but it wasn't easy. After 10 minutes we gave an easy goal away even if we knew before kick-off that they had five or six who are giants compared to our physical presence," the Italian told Sky Sports.
"The first corner kick we conceded we give a goal away. Then you saw Craig's bad challenge.
"We have to be careful and to handle our aggression. We have to make sure we don't repeat the same mistakes otherwise we are in real trouble."
After slumping to a 6-1 defeat by Villa when playmaker Sessegnon was sent off, Sunderland dug deep to find a route back into the match.
They had looked to be dead and buried after the first half when they created little, but came close to winning the match late in the second half when a low shot from Danny Rose grazed the outside of post.
Stoke stayed 11th on 41 points and should be safe.
"We are pleased that we've got that point," manager Tony Pulis said. "That takes us to 41. There are a lot of teams down there this time around.
"I'm amazed it isn't sorted out yet. It's one of those funny seasons. It seems to have happened at all levels, not just the Premier League."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.