This is where The Doctor and Clara's role reversal gets really interesting. As the group is put in greater and greater danger, Clara finds herself having to make some difficult choices. What does she tell them? How does she help them? The Doctor tries to talk her through it, suggesting how to take leadership of the group and how people with hope tend to fight harder to survive. This gives Clara -- and us -- a first-hand look at the hard choices The Doctor has to make... and it means The Doctor, too, has to confront how he acts around others. ("So that's what I sound like?")
While many episodes put both The Doctor and Clara at risk, it's rare that you actually feel there's a danger: with The Doctor often acting over-confident, it's hard to think that they won't make it. But here, with The Doctor on his own there are moments when he clearly doesn't think he's going to make it, going so far as to try to encourage Clara she can save the group without him when he thinks the (tiny) TARDIS is about to be hit by a train to giving a dramatic goodbye speech when life support in the TARDIS starts failing. "You made a mighty fine Doctor," he tells Clara without being sure she can hear him... and anyone watching would have to agree, because being in charge is something she manages extremely well (aside from constantly bungling things with Danny). And, after seeing this version of The Doctor be thoroughly uncaring this season, it's good to see that he's not entirely immune from feeling and fear.
But since we already know we have another episode next week, things work out in the end: Clara manages to recharge the TARDIS's energy banks and, back at full size, the TARDIS pushes the The Boneless away from the group with a force field before The Doctor strides out and gives a speech we've come to expect from his other incarnations: saying that this plane is protected and they're not welcome here.
Matt Smith and David Tennant both had that speech in their very first episodes... but with Peter Capaldi, we've waited until episode 9 to get a real sense that he cared about saving people. This was a great episode, but it feels like we should have gotten to this point a lot sooner -- preferably without spending the first half of the season seeing how much the audience could grow to dislike the main character. The story arc of Clara distrusting and then learning to trust this new Doctor has driven some truly great -- and also well overdue -- character development for Clara, but it's taken far too long for it to get to the good stuff (i.e. this episode).
Of course the episode ends with a twist that suggests Clara might not be what she seems... but we'll have to wait and see just what Moffat has in store for us there.
Bottom Line: "Flatline" isn't just a great Doctor Who story, it's a great hour of innovative science fiction. The episode's thoroughly strange story is backed up by compellingly creepy visuals -- no bubble wrap monsters here -- that make it a treat, both narratively and visually.
Recommendation: "Flatline" is the best episode of season 8 so far. Whether you've been keeping up with the season or not, you should watch it.