The crazy part about Schweinsteiger is how underrated he was by Bayern fans and even more when he played for Germany until he won CL/WC after which a story of failure and heroic salvation was constructed. With all the delusion before and revisionism after winning the titles, it can be a bit tricky to fairly evaluate him.
I agree with most of what
@Balu said, but would add some qualifications / differing view.
When Schweinsteiger turned into a midfielder for bayern, he wasn't a DM or a b2b. He picked up the ball deep either between the CBs or on the left side on the CBs and facilitated the transition from the back. He wasn't particularly adventurous at this, which is a reason why many fans weren't thrilled about him ("only side-way passing"; this was the reason why he was rightfully seen as "too similar to Kroos" to play as a double pivot with him). Someone has to do this job and he was very good at it, but he also had defensive weaknesses. That why Gustavo and Martinez were bought to replace an ageing and error-prone van Bommel. He definitely benefited from playing next to a midfielder who did most of the dirty work, despite not being lazy like Kroos (fyi: I am a huge Kroos fan-boy). In his best season for Bayern, when the team won the treble, he was second best to Ribery, who was by far the best player in the team. Over the course of his career for Bayern I rate multiple players of this generation/team above or on par with him. Injuries shortened his peak and overall he was more a "kog in a machine" than the main-attraction (slight exaggeration; he is a bayern legend).
I consider him a lot more important for Germany, where he tried his best to compensate for the deficiencies of an unbalanced and tactically naive team. Most of his career he played next to Khedira as a double pivot. Khedira was very lackluster when it came to positioning, breaking up play or tactical awareness. He was a bit of a headless chicken, so Schweinsteiger had to take over a lot more defensive responsibilities, while also being the guy who initiated the build-up. Whats really impressive is, that Schweinsteiger was able to do that time and time again in (slightly) shifting teams, that were all quite shacky. When putting on the German shirt, he showed remarkable tactical understanding and a level of flexibility, that really sets him apart. He played well despite dodgy coaching, tactics and other players failing to perform; he also played well despite being ridiculed and getting all the blame. He was a true leader in this team; something that is missing dearly since he left.
When looking at club performances, Modric is imo edging it. Yet despite his good WC, he doesn't match Schweinsteiger's contribution for the national team (both in terms of longevity and peak).