On one secondary profile I can play media, and with the setting "show media on lock screen" enabled that media can be controlled from the lock screen, as expected.
Right now, when I switch to a different secondary profile, the media from the first profile is visible on the different profile's lock screen. This is happening on my phone for both Spotify and Newpipe (the only two media players I've tested). In the case of newpipe, I'm even able to play the media from the first profile from the lock screen of the second! This is on a pixel 6.