Shared albums are not infinite free storage. There are limits on the number of albums and the number of items in the albums, see: My Photo Stream and Shared Albums limits - Apple Support
But worse, the photos on the shared album are just for viewing. You will lose metadata, when sharing photos this way, and you lose quality. You can only share smaller version, not larger than 2048 pixel at the longest edge. If the quality of your photos is important for you, do not use shared albums to save them or to transfer them to other devices. How to share albums in Photos on your iPhone, iPad, and Mac - Apple Support
See the paragraph "File types that you can use in Shared Albums":
" When shared, photos are reduced to 2048 pixels on the long edge, except panoramic photos, which can be up to 5400 pixels wide. You can share GIFs that are 100MB or smaller. ..... Shared Albums upload a copy of your data. Downloaded content may not contain the same information as the original."
But to answer your original question: The shared albums are holding copy of the photo. You can delete the original from your Photos library and the photo will still be in the shared album. But I would never do that, because all you will have left is a smaller version, without a location, a caption or title, and possible the wrong date.