It seems really strange that after 20+ years of not seeing Yosef, when he finally sees him he says Shema.
I saw 2 very different approaches in the mefarshim.
The Maharal explains that Yaakov felt a tremendous outpouring of love and wanted to direct it towards Hashem. He felt tremendous gratitude and love to Hashem for returning his son alive and therefore wanted to show it by being מקבל עול מלכות שמים.
The Netziv has a very different explanation. He explains as follows based on the Targum Yonasan. The Targum explains that Yosef wanted to fulfill his dream (that his father would bow down to him) and therefore he came to his father dressed in his royal garb so that his father would not recognize him and bow down to him. Yosef's plan worked, however, Yaakov was annoyed with Yosef for forcing the dream to come true in that way and making him bow down. Therefore to stifle his annoyance he said Shema. Yosef, realized that he had made a mistake in making his father bow to him and therefore cried on Yaakov's shoulders.