Discuss please. I have specific thoughts, but curious as to others.
Prerequisites for this spell to work: creature has to be willing, and you need a focus component which is a piece of paper with the target's name
Since Commanded undead will literally slice their own heads off if you ask them to, I see no reason why they wouldn't be considered "willing" as long as you said "I want you to let me cast a spell on you."
The second requirement might be a little tough, since some undead probably don't even have names anymore, but theoretically you could just ask the undead creature "what's your name?" and if it has one, it would tell you since it's under your control.
Well spell says you share body with the host soul, do undead have a soul to share with ?
If they have no soul then , would that not mean they have no space for a soul ?
I mean if this is possible then by the same token using this spell on a mindless construct would let you slip in your soul and fight as a construct.
taken further, could you then inhabit any animated object with this spell ?
Just because a creature currently does not possess a soul, doesn't mean it can't be inhabited by one.
Also, technically if this wouldn't work, the spell would call for a willing create with a soul in the target line or else state as such in the description. So, it appears RAW, but as always any particular DM can try to divine RAI or simple decide the do or don't want spells to work however they would like.
I don't think mindless undead can be "willing" to do anything. They just mechanically follow whatever commands you give them. But the spell doesn't have "Mind-effecting" or anything, so I guess it still works
For anyone interested, Sean K. Reynolds indicated in the Pathfinder RPG FB group that Marionette Possession is intended to work "as magic jar" when asked about its interaction with mindless undead.