Aarons joined the Cherries from Norwich City in 2023 in a transfer reported to be worth £7m, ended last season on a six-month loan to Valencia.
He made four appearances for the side who finished 12th in La Liga and the Spanish club decided against taking up an option to buy.
Bournemouth rejected a £6m offer from Southampton for the London-born defender when new Rangers head coach Russell Martin was manager at St Mary’s last July.
By then, he had made 23 appearances, 15 of them starts, in his first season with Bournemouth, but last season he played only four times, two from the bench, before leaving for Valencia.
And Martin said: “Max is a player who I have always kept a keen eye on since he was emerging through the youth ranks while I was coming to the end of my time at Norwich as a player.
“He is a wonderfully talented player who is hungry to develop, improve and help deliver success for his side. I believe he will be a fantastic addition to the squad.”
Watch all your favorite Amazon Prime Video Sports broadcasts live and free. Get access to NFL, NBA, NASCAR, WNBA, and more – all included with your Prime membership!