Probably. It was most likely agreed to when you accepted terms and conditions on Spotify.
If you used a google email that may be why that's happening since google would already have the data from Spotify.
That being said, you can go onto your account settings and select to not have ad preferences functioning which means ads wouldn't be based on activity on other apps. I'm not sure that that would prevent data sharing though. I'd recommend doing some more research on it, and seeing if you can use a cookie blocker or somethng to limit it.