Cancel Apple Music subscription > Subscribe in future > Playlists lost or not?
From this Apple Discussion:

Apple does not retain your details indefinitely and whilst there is no grace period but I believe if you resubscribe within 30 days you will continue to access the music in iTunes Match.
I would add that your playlists are dependent on what is in your iTunes Library and included in your iCloud music library.
If you have all your music downloaded to your computer and you resubscribe later, iTunes Match will scan your library again to determine what can be matched and needs to be uploaded. Once you turn on iCloud music library on your iOS device, you should see your playlists. You will need to download if necessary.

Summary
Your playlists and data aren’t retained