When you subscribe to Apple Music your own local content should be scanned and either matched or uploaded to iCloud Music library. As long as you keep all of the content stored locally on your computer, and ideally backed up as well, then when you decide to turn off Apple Music you only lose the additional content you've obtained through the service. If, on the other hand, you delete local files to free up space, because everything is now in the cloud, and close the Apple Music service before redownloading your personal content then you are going to get unstuck. Assuming you still have your media I suspect you need to turn off iCloud Music Library on your iPhone so that it can clear the Apple Music list, then turn it on again to properly load the new version of iCloud Music Library made with iTunes Match.
See About iCloud Music Library icons and status - Apple Support to review the status of your library. Ideally everything will be purchased, matched or uploaded. You can select anything that says Waiting, right-click, and add to library, in order to try to force it to update.
tt2