Key word is optimize local storage. With this turned on, the size will never be the same across your devices. It's optimizing your storage. Either your iPad has less storage available than your iPhone; or you've looked at more pictures on your iPhone, causing it to download the full hi res version for those. This is normal and is nothing to worry about.
If you really wanted them to be the same size across your devices, then turn off optimize storage (assuming you have enough space).