I remember when GT5 came out, it was much better known, friends who didn't play the game or didn't even have a PS3 knew about it. They'd ask so you play racing games? Like what, oh GT I heard about that.
When GT6 came out, its not really underrated, as the scores do fit it and the general reviews are okay. It just seems that the timing for GT6 was wrong. It came out as a PS3 exclusive for one, and for two, it was released around the general hype and enthusiasm of a next gen console, that compounded with holidays, then even more compounded with the lack of media advertisement.
At the OP, the reason those games are ranked much higher than GT6 is not always the case of it being a much better game. Sometimes, its the advertisement and the establishment of the whole game franchise. Sonic and Call of Duty are extremely well established franchises with Cod going back many years, and Sonic having a special place in the heart of all 80s kids. What these franchises have done is simply a much more effective and broad media campaign, and the fact that they are globally known around the world, along with them porting it to many of the new consoles out there (PS4, XB1, WII U, 3DS to name a few). Everybody knows about the blue hedgehog and the word "Cod" but GT is near that level.
The mistake they made was the bad release date and the timing of it, you could say they were the victim of circumstance, but that combined with how many of the people who bought the game were satisfied, but not satisfied with it as a game, as a GT game it had what was needed, but in terms of it being a good game to appeal to all, not really. GT has been marketed as more exclusive in my opinion, seemingly looking as if it was for those with a certain niche of racing and such, marketed as a driving simulation. No doubt that will appeal, but games nowadays don't appeal to certain groups, like say a Halo game appealing to those who like FPS and violence, no, the appeal is more universal, trying to get as much sales as possible.
With the issue of Forza 5, thats because simply its on a next gen console, the hype is around it, all games get negative press, and some get positive press, but the thing is, its not the quality of the press, its the quantity of the press, and with Forza being on a next gen console thats constantly on the gaming and tech news, there is no wonder as to why its getting all this press. Some companies would rather get as much press, disregarding whether it is positive or negative, as opposed to a small amount of news being mostly positive.