If you cancel from Apple Music subscription, all songs you've added or downloaded to your library from the Apple Music catalog becomes unplayable.
If you want to play Apple Music songs and Spotify songs on MP3 player or other devices, you need to convert Apple Music, Spotify music to MP3. Why You Need to Convert Apple Music and Spotify Music to MP3?