The short version is "you have to buy the base game and Shadowbringers for both platforms."

More thorough (more complicated) answers:

The MogStation keeps track of the base game and all expansions and platforms. If you have everything on PC, it would look something like this:
Code:
        PC      PS4     CE
ARR      x
HW       x
SB       x
ShB      x
If you bought the base game for PS4, you would be able to play any ARR content and enter any ARR areas. However, if you logged out from PC while in a HW/SB/ShB area, you would be locked out of the PS4 version until you logged back in with PC and moved to an ARR location. But as long as you logged out in an ARR area, you would be able to log in on PS4 and do non-expansion activities like low level content and retainer management.

If you had previously registered, say, ARR/HW/SB, you would have been able to log in as long as you were in any non-ShB area. However, the only way to have ARR/HW/SB but not ShB registered is to have registered Stormblood before ShB came out.

This is because buying Shadowbringers for PS4 would fill in all the HW/SB/ShB licenses for PS4, as the latest expansion always subsumes the previous expansions.

And the CE is tracked as its own "platform", so getting either the PC or PS4 collector's edition for a particular expansion will count for that expansion regardless of platform.