Hi there!
I'm an Apple music Subscriber and I think I'm eligible to answer your question.
You might know that you can download songs in Apple music while you have subscribed to it.
You can access these songs even after subscription ends. You won't be able to listen to new songs once the subscription ends!
In short, you won't lose your downloaded songs
Peace!
-Kiran