The difference between
Magma Spray and
Burn from Within is that the phrase “that creature” in the final sentence references different noun phrases on each card–it's a function of English grammar.
On
Magma Spray, things are simple because there is only one noun phrase which “that creature” could be referencing: the “target creature”. So it doesn't matter if anything's dealt damage, because nothing's telling you to care about that. But on
Burn from Within, there are two such possible antecedents. One, as on Magma Spray, is “target creature”, but the other is “creature (that was) dealt damage this way”. These are two completely different noun phrases, and could end up referring to completely separate objects thanks to effects like
Harm's Way so it's important that we know which of them the last sentence references.
So we turn to the rules of English grammar, which tell us that when there are multiple possible antecedents, the most recent one is the one being referenced. In Burn from Within's case, that's “creature (that was) dealt damage this way”. Thus, you're looking to exile the creature that was dealt damage. And of course, if the damage was prevented there is no such creature, and so nothing can be exiled.