This is a well known bug that Codemasters will not fix.
The AI on Spain is harder because the AI do not seem to recognize Tyre wear and fuel simulation, this happens on all the tracks anyways so there is one reason.
The other reason is that the AI is badly coded, they are able to take some turns incredibly quick, it does not help that they can put out lap times like they are on the 66th lap of the race on every lap, so the front runners are doing 1:22s to 1:24s on a regular basis, which is absolutely impossible for many players to contend with, when they have a full tank of fuel on board.
They seem to be really fast around most bends, and they are really quick on turn 7, that is the place they always pull away from me, and also many times i raced in a Grand Prix with cars behind me, they will often spin off at corner 8.
The only corner i noticed they are slow is turn 10, they brake incredibly early for this, and many times i have overtaken 1 or 2 cars here.
They are pretty quick for the rest of the lap, specially through the chicane, however accidents with the AI is common here, many times i have come through here avoiding cars.
Spin offs seem so much rarer on other tracks on Legend AI, they happen but not to the extent of Spain, also i notice the AI is incredibly stupid in Spain, they do not get slipstream even if they are directly behind you, and they will not pass you at all, if your keeping the pace up and make no mistakes.
AI that are driving 2-7 seconds quicker then you, should have the ability to pass you, but it seems they cant even do that, and will form trains behind you for most of the grand prix.
Its not til the last 10 laps of the race, that a player is able to come down to the times of the leaders, but at this time you have probably been lapped 1-3 times by the front runners, and there is no chance of catching them up by that point.
My last attempt, i managed to finish 16th... And i started on Pole, which was over a second faster then any other driver in Qualifying.