Background, with potential spoilers: In the Netflix show Stranger Things...
...there is an otherworldly creature known as the Mindflayer, which can telepathically control creatures in our world as long as the portal to its world is open. Once it has a creature from our world under control, one of the things it can do is "melt" that creature into more flesh to add to its preferred monstrous avatar.
If we skip the psychic stuff, there's still a pretty interesting creature there. To qualify as a Mindflayer monster, an organism should
Have a reproductive / feeding stage in which it acts like a non-contagious infection spread by physical contact with an adult monster (and possibly other ways). Once a victim is infected, the organism alters its host's behavior to seek out an adult monster and increase the chances of other hosts being infected. Eventually, the host is killed and its body digested to convert into monster flesh.
Have an adult stage with limited shapeshifting abilities. Specifically,
- any small piece of monster flesh should be capable of moving around on its own for some amount of time and seeking out other flesh-blobs with which to merge; this need not be indefinite, but should be long enough to be useful.
- monsters should be able to divide into smaller pieces to squeeze through grates, squish under doors, etc., and rebuild themselves on the other side, while maintaining at least enough memory to continue with whatever goal they have in mind for doing the self-squishing (high intelligence not required).
- given sufficient mass, monsters should be able to assume at least one complex ambulatory form, with legs and a body held up off the ground.
Ability to shapeshift into any additional forms (besides blob, walker, and pieces just cut off of a walker) is not required.
So, how could such a creature work, and how could it evolve?
A list of all Anatomically Correct questions can be found here: Anatomically Correct series.