The ending of Insidious (2011) means that Josh did not come back from The Further alone, and the old woman who stalked him as a boy now occupies his body. In my opinion, it is a fair twist because the film sets out the rule early: Elise tells the family that spirits want an empty body to return to the living world, and Josh was an empty body for a time while he searched for Dalton.
The structure of the rescue is what makes the last minutes work. Josh crosses the haunted realm, faces the red faced demon and finds Dalton, and the two wake in their bodies. The spirits that filled the house vanish, and the film gives the audience exactly one scene of relief. Then Elise, who has spent the whole film being the person who knows the rules, senses that something is still wrong. She photographs Josh, he strangles her, and Renai finds Elise's body and the photo, which shows the old woman in Josh's place. The film ends as Josh appears behind Renai.
Why does it land? Perhaps because the film has already shown that Josh once buried the memory of his own ability after the old woman stalked him as a boy. The villain is not a new arrival, it is an old debt. The dread also comes from the choice of victim: Elise is the one character who could have explained what happened next, and the film removes her before she can.
It could be argued that the ending works because it undoes the relief of the rescue. The family does the brave thing, the child comes back, and the cost is hidden inside the parent who saved him. Compare that with the later films. Insidious: Chapter 3 and Insidious: The Last Key return to Elise as the confident guide, and both are prequels, so their audience already knows her fate in this film. The Red Door (2023) then picks up with Josh and Dalton nine years after the second film, with Josh having buried his memories of the Further again and Dalton painting the red door, so the rescue here is the wound the whole series keeps reopening.
There is also a production reason the ending plays so cleanly. Director James Wan wanted a film without the heavy gore of the Saw series, on a budget of about $1.5 million, so the last shot relies on a figure appearing behind Renai instead of on spectacle. Composer Joseph Bishara also plays the demon on screen, which ties the film's sound and its monster to one person.
That being said, the film leaves the rest to the sequel, and Insidious: Chapter 2 picks up right after, with Josh as the main suspect in Elise's death. The wider story is laid out on the Insidious timeline.