That sort of wall, where it doesn't have a pillar up to the ceiling, must be strengthened like mad to prevent it bending. You've got to imagine that overweight visiting relative grabbing the end of it and hauling themselves into the shower.
If it flexes then it will break the seal between it and the shower tray, causing damp issues.
Screw down with large screws in pilot holes into the joists, not just the floorboards.
It would be better if there was a tiled pillar between its top and the ceiling, which needs to go through the ceiling and be securely bolted to a noggin between the ceiling joists. Nuts, bolts and crinkle washers all round. You will need a pillar anyway if you're having a door.
Glue, screw and brace the framework, go mad on it. You can't overdo it, the potential damage from underdoing it will be terrible.
If you have a cupboard as shown then make use of its rigidity by screwing it securely to the original wall and your new one.