Carlo Ancelotti will bring his side to the south coast on Sunday, 21 July (kick-off 7.45pm) in a fixture the Cherries have clinched to celebrate their promotion to the Championship.
Bournemouth chairman Eddie Mitchell told Sky Sports News the coup was down to a chance encounter - and said he expected stars such as Ronaldo to turn out against Eddie Howe's team.
"It's fate really," Mitchell said. "My son was talking to a mutual friend who knows people at Real Madrid and got chatting about a possible exhibition match and we've worked hard over the last three or four weeks to finalise things.
"I'm over the moon for the supporters. It'll be a great night for them to see some of the best players in the world and for our players to pit themselves against them.
"We're going to see Ronaldo for sure. And it'll be (Zinedine) Zidane's first game as Carlo Ancelotti's coach. The only ones who won't be there are those that have played in the Confederations Cup."
An adult ticket will cost £60, with a £5 discount for season-ticket holders, while U16s will pay at least £25, but Mitchell insisted the prices were fair.
"I think for the club it's priceless," he added. "It's showcasing what we can do on a matchday against a special team - some of the world's best players.
"So, no, I don't think it's too expensive; it's a great opportunity."