All songs from Apple Music exist in the format of AAC files. As they’re protected by a special kind of DRM, you are not able to play them on any device without the Apple Music app. Beyond that, you can only keep those songs downloaded from Apple Music during the subscription. Most importantly, once canceling your subscription, you cannot stream them anymore.
Therefore, if you want to continue to listen to Apple Music after stopping your subscription , the only way is to break the DRM from Apple Music and convert Apple Music songs to MP3. you can try Tunelf Audio Converter to convert Apple Music songs to MP3 then transfer your apple music to Android devices with USB.