Should spf ip be the server ip or the shared ip? I ask because I believe cpanel sets the mail server ip to the shared ip by default. However, it sets the spf ip to the server ip tied to the server hostname.
The SPF record configured by cPanel will use the main server IP address. This is by design. The use of "+a" and "+mx" in the SPF record account for the possibility the account is assigned a dedicated IP address.