First song I ever recorded (was to/to was) a Fat Joe beat
Solution 1:
No in the case you cite you cannot switch the positions. "First song I ever recorded was to a Fat Joe beat." is correct, and "First song I ever recorded to was a Fat Joe beat." is incorrect.
But your other example, "First song I ever listened to was Shape of you." is correct, and "First song I ever listened was to Shape of you." is incorrect. So why?
Because the verb "listen to" a song is correct. You can say "I listened to a song". "Listen to" is the verb and "a song" is the object. You can't do the same with "recorded to". You cannot say "I recorded to a song". You say "I recorded a song".
So correct sentences are:
First song I ever listened to was Shape of You.
First song I ever recorded was Shape of You.
So what's the "to" doing in the original sentence? It doesn't have the same meaning as the "to" in "listened to". It describes the relationship of the song to the beat.
A song is "to' a beat if it uses that beat.
This song was to a Fat Joe beat.
This song is to the beat of a military band.
This song is to an Electro-pop beat
So "First song I ever recorded" is a noun phrase indicating which song we are talking about, and "to a Fat Joe beat" describes what the song was like.
In your second example "First song I ever listened to" is the noun phrase indicating the song we are talking about, and "Shape of You" describes the song.
If you move the "to" from one phrase to the other either way you change the meaning.