If you stop subscribing to Apple Music, I believe that all of your offline listening copies of Apple Music streaming songs stop working and go away. Restart the subscription and – well, they're gone. The new subscription might let you access the songs again, but I don't think it will restore everything you had set up locally when you ended the old subscription.
Ending an Apple Music subscription shouldn't affect purchased music – songs imported from your CDs or purchased from the iTunes Store, etc. But If you had iCloud Music Library, iTunes Match, or Apple Music's Sync Library turned on, I'm not sure what actually happens.