Each of those is a single creature regardless of the number of heads. Nothing in their description indicates multiple souls even if the ettin description states that each head has a separate personality.
Keep in mind that D&D 5th edition has a fairly specific definition for the word creature. Consider the Resurrection spell which states:
You touch a dead creature that has been dead for no more than a century, that didn't die of old age, and that isn't Undead. If its soul is free and willing, the target returns to life with all its Hit Points.
It says nothing about creatures with two souls or only one head. Only that it didn't die of old age, died less than a century ago and isn't undead.
As for Magic Jar, the spell description states:
You can attempt to possess any humanoid within 100 feet of you that you can see (creatures warded by a Protection from Evil and Good or Magic Circle spells can't be possessed).
An Ettin is not a humanoid, it is a giant so the question of the number of souls or heads is irrelevant. Likewise a Hydra is a monstrosity so you can't possess it using Magic Jar either.