If you are not using the flags generally they could be used as a method of filtering. For example go to your shared album and select all thumbnails (Ctrl+A) or shift click the first and last. Press the “P” key to add a pick flag to each. Now go to All Photos and click the filter icon to the right of the search box. Then click inside the All Photos search box and choose un-flagged.
Better still, with the filter icon active click inside the search box and then click Album. Scroll to the bottom of the album list and choose “not in any album”
That "Not in any album" filter works when there is only the one album, but if there are multiple albums and you are trying to identify ALL images not in a single specific album, then that filter doesn't work. In that situation, and because there isn't an "Invert Selection" tool in Lightroom, you're left with the original suggestion of using the pick flags workaround.