This is gonna be a bit of a character exploration/analysis for Ryland Grace both in movie and book canon since I find him so interesting and multilayered:
I think making Rylan Grace an eighth grade science teacher was one of the smartest choices made for his character. I think it adds so much more than if he were some jaded professor or something. It gives him so many more connections outside of the traditional scope that we would expect from a person (family, spouse, pet, children of his own).
As someone who has many teacher friends, especially middle school teacher friends, it tells me two things about Grace right away. 
1. He’s a very empathetic person.
This seems kind of obvious at first based on everything that we learn about Ryland through both the book and movie. He’s a person who cares fundamentally to his core even if he is afraid he does have that level of care and humanity to him.
I think his background takes it a step further.
Being a teacher, for a lot of people becomes very personal because you spend so much time with those students forging bonds and connections, which adds another level of altruism outside of the baseline of any individual person.
Being a middle school teacher, in my personal opinion, requires a certain level of empathy, because you are dealing with young people who aren’t even young adults yet and are just exiting childhood. It’s a new and terrifying experience of trying to learn who they are and where they belong in the world, not to mention the beginnings of puberty. 
Grace as a person who, for many years was in a more rigorous academic environment around peers his own age and likely older, would’ve had to have adapted his teaching style to fit a younger group of individuals. Because at the end of the day, teaching isn’t just about the content. It’s also about your students.
Teachers, especially in a public school setting, wear a lot of different hats on top of teaching and a lot of that pertains to a students well-being and health. I think learning to juggle that newfound responsibility is something that Grace would’ve had to have gone through. 
This to me shows that while Grace absolutely has a very strong baseline of empathy. There is also the additional aspect of growing and developing from a rather harsh and egocentric academic to somebody who had to learn to soften his approach and methodologies for younger minds to be able to absorb and engage with. 
Bouncing off of that I also believe that (and this one may be a little bit more headcanon, but I’m using his canon background to jump off of):
2. Grace is someone with a low tolerance for bullshit. 
I don’t think this is something that gets explored a lot outside of his former status as an academic, which don’t get me wrong, I think that definitely adds an additional layer to it. However, and I say this with nothing but love in my heart.
Middle schoolers are assholes
It’s not always their fault, they’re dealing with the changes in their body and hormones that come along with puberty as well as learning how to handle a whole new emotional range for themselves and how to face a newfound sense of maturity.
But middle schoolers are absolutely assholes.
To be a teacher at any level, I think one definitely has to develop a rather thick skin when it comes to dealing with administration, parents, other teachers and especially students. We know Grace partially has that already from being in the world of science and academia and having to deal with the rejection of his theories and his paper (whether or not he truly handled that well is more up to whether you subscribe to the book canon versus the movie canon, since in one instance he was fired and in the other one he quit).
We also know he’s worked hard to curate his persona amongst his students as the “cool teacher” that would come with a lot of failures and cringeworthy moments as not everything you do with students is going to land. 
There is a quote where we do see a little bit of his low tolerance for bullshit but specifically related to the parents of his students:
This to me demonstrates both his empathy and his low tolerance for bullshit when it comes to others so I don’t think it’s a wrong take to view Grace as both highly empathetic and somebody who’s not afraid to pop off when his bullshit meter starts pinging 
All of this to say: fic writers, don’t be afraid to add these dimensions to Grace as a character! I’ve seen a lot of great fics that do this, and I want to see more. I absolutely love when people explore Grace as a multifaceted character as it relates to different aspects of his teaching and personal identity