Aurangzeb was the sixth Mughal Emperor and last of the "Great Moghuls". He spent much of his reign trying to conquer the south of India. This contributed to the empire's downfall because of an inadequate focus on maintaining central administration. Another factor was Aurangzeb's strong intolerance of religious groups other than Muslims like Sikhs and Hindus, leading to strong secessionist movements such as the Marathas. A last factor, outside of his control, was a long war for succession after his death in 1707.
Suppose Shah Jahan's intended heir Dara Shikoh wins the struggle for succession. He was much more of a philosopher king and very tolerant of the Mughal Empire's religious and ethnic minorities unlike his brother. He'd focus more on central administration and less on warfare, and most of the secessionist movements like the Marathas would likely be stillborn because Dara's rule isn't as oppressive as Aurangzeb's was IOTL.
What happens now. Can the Mughals successufully modernize? I don't see why not, they weren't isolationists like Qing China. And if they do, does this put them in a position to resist British encroachment from the 18th century onward?