Yes, it's true that the Real Madrid squad is much better than the Leverkusen squad. If we looking at the current situation, Leverkusen is still quite stable with a squad that is usually at Leverkusen. What if Xabi Alonso trains Real Madrid, which has a more capable squad? of course Xabi Alonso will achieve success with Real Madrid and will probably get more than 1 title in 1 season, I really look forward to Xabi Alonso coaching a club like Real Madrid after all this will also make Xabi Alonso a successful coach if he trains a big club and is able to wins title.
A coach will be able to bring out the best potential from a club if the club has players and a style of play that suits the coach. That doesn't mean that if you are very great as a coach at a club, it doesn't necessarily mean that you will be even greater if you coach a club with higher quality players. There are many factors such as the coach's approach to the players or how the coach manages the existing squad to be able to play with the expected tactics. I agree that Xabi is a great young coach at the moment but if he were to coach Real Madrid then it would be a different challenge.