Chema has agreed to a deal that will keep him at Stuttgart until 2030. He made two senior appearances for Real Madrid last season.
Chema expressed his excitement about joining the team, saying, "My first impression is very positive. I'm glad to be here and I'm looking forward to my first training with my new teammates."
"The Bundesliga is a fantastic league," he added. "I've always dreamed of moving to a special club in one of the top leagues and taking my next steps there."
Chema's transfer to Stuttgart was completed for a fee of €3m.