Barcelona defeat in the previous few games left them 7 points behind Real Madrid, so what you said honestly I doubt they can win the title. I see Real Madrid now have developed better than at the beginning of the season so I don't think it will be easy to shift their current position. I think the most potential is Atletico Madrid, so I think for now they are the only two competing. But let's look forward, if Barcelona are serious, there is a possibility to catch up on points and compete closely towards the end of the season.
Ofcourse Madrid understands that play time is over and they now need to put in the work they need to get trophies and to sta in good positions that they will hold on to till the season gets to the point where they become deserving of the trophies. Barcelona will actually need to get lucky if they must be able to win the title, they currently aren't in the best position to get that done but they can obviously do it as they got some time to get it done so for me it's not a complete write off on them just yet.