I would say that on page refresh no, you should not continue to show a modal.
Modals are, by their nature, intended only for limited, transient information that is used to supplement or enhance the main content. If the information being shown in them is important enough to be displayed as the main content on a page refresh then they should most likely be in a page of their own.
Also you need to consider the users expectations. I would be very surprised (and probably a little annoyed) if a modal refused to go away when I expected it to (which would be choosing an action, clicking outside it, closing it with a close button or hitting the refresh or back button).
On sharing a link however, there is no need to change what is being viewed on the page at all as a link share can be incorporated directly into the modal.