Some things I noticed, when using the iCloud Shared Library on my iPhone and iPad with iOS/iPadOS 18: I am also using the iCloud Shared Library to share the library only with myself, but also between my two different Apple Accounts (my private and my work account). All photos in the shared library have only been uploaded from my private Apple account, however.
When you save photos to Photos right from the camera to your Photos Library on one of your devices, it will depend on your Settings on the device, if the items will be added to your personal library or the iCloud Shared Library. When you set up a shared library, you can turn on the automated sharing, so all new photos will automatically be added to the Shared Library. I would never, ever even think about using this option. It can be embarrassing, when we accidentally take a photo. I am adding only photos worth showing to others in the iCloud Shared Library. All new photos and videos will automatically be added to the Shared iCloud Photos Library, if the Settings > iCloud > Fotos > Shared Library > From the Camera is enabled.
The "optimize Storage" feature is fully automatic, and Apple is not describing any details how to control it, only that it will try try to keep the most recently downloaded items stored locally, as storage permits. When we use a photo or video and Photos needs to download it from iCloud, it will remain downloaded for a while. This is independent of the location in iCloud, whether it is in the Shared Library or the personal library.
It is expected, that "Optimize Storage" will give different results on our devices, depending on the amount of free storage and the recently viewed items.
If you are taking the new photos with the iPhone and not with the iPad, the photos will remain for some time downloaded on the iPhone, until Photos will optimize them to free storage. The photos will be downloaded in the full resolution on the iPad as well, as soon as you are using them there for the first time.
On my iPhone the Photos Library is also much larger than on my iPad. I have not even turned on "Optimize Storage" for Photos on these devices, because the devices have enough free storage, but the iPad is in no hurry to download new Photos in full resolution from iCloud, only the thumbnails are downloaded instantly, when the iPad is syncing with iCloud. But once I have viewed a phot enlarged, it will remain downloaded.
I think, the different use of local storage and different amount of Storage optimization on your devices is the expected behaviour, because you are using the Photos.app differently on your devices and because they are having a a different amount of physical storage. It does not have any influence on the amount of used local storage, if you store the photos in your personal library or in the iCloud Shared Library. Both libraries are mirrored locally in the same way, and the "Optimize Storage" procedure is the same for both libraries.
Sharing the library with yourself does not help to save local storage. But it is very useful to have two different sets of photos and videos. I love it to have my best photos, hand-picked in the iCloud Shared Library, and the photos I am currently working on, and are not ready to be seen by others, in my personal library.