This is Seirei Gensouki: Spirit Chronicles.
Haruto Amakawa is a Japanese college student who died in a train crash
before he could reunite with his childhood friend, Miharu Ayase, whom
he hadn't seen in five years. Next thing he knew his memories
resurrected in the body of a boy, Rio, living in the slums of the
Bertram Kingdom in the Stralh region of another world. Two people with
entirely different backgrounds and values—Rio wants revenge on behalf
of his mother, who was murdered in front of him. Complicating matters,
Rio suddenly encounters a kidnapping involving the two princesses.
After Rio is cleared of abduction, the royalist rewards him with
acceptance to the kingdom's academy for studying magic and
swordsmanship. However, Rio is shunned by most of the peers there due
to being a peasant. His only companion there is Celia Claire, a young
female teacher who invites him into her laboratory on a daily basis.
Before graduating from the academy, due to a false accusation, Rio
became a fugitive and was forced to flee the country. He promises
Celia that he will return once he travels to the far east of his
mother's homeland to find his roots and stabilize his mixed
personality. Along with Haruto's memories, Rio awakens a "special
power," and it seems that if he uses it well, he can live a better
life.
One of the characters is a "high class spirit" that sleeps within the main character for most of the first couple of serials.
Aishia is Rio's contracted spirit. She is willing to do anything for
the sake of Haruto's happiness. Rio learned that she is an upper
high-class spirit after he met the Spirit of the giant tree, Dryas.