First, take the shower head off and see if you have good flow out the pipe. If not, then yes, you could change the piping. I wouldn't use pex there, but copper or cpvc (NOT PVC) could be used. In reality, pex would likely work there since all modern showerheads are restricted in flow, so the slightly smaller ID of pex wouldn't come into play, but it WILL be an issue if you try to use it to connect to the tub spout.
Cast iron is typically used on drainage systems, not supply. It is entirely possible you have galvanized iron supply lines and those could easily be plugged up at 50+ years. If so, you may want to start to budget for a whole house repipe.