After hours of research, I need some help understanding Madrid Versus Barcelona

I am a 32F from the US going to travel to Spain in February. There were some change of plans from my earlier post, but I am also going to places you all have suggested before Spain.

That said, I’ve spent hours looking at how each city is laid out by district and neighborhoods, site seeing and more. I understand it all but I found this puzzling: it is commonly suggested to spend more time in Madrid than Barcelona. I am aware Madrid is MUCH bigger (21 districts and 131 neighborhoods is massive), but it seems that Barcelona has that whimsical (Gaudi) experience, arguably more touristic…

That said, do you all feel I should really spend 2-3 days in Barcelona and 3-4 in Madrid? I have 7 total days. I enjoy museums, architecture, and great food (I know you can’t go wrong in these cities for that.

TLDR: should I really spend less time in Barcelona than in Madrid? It seems like it’s simply due to size, but do people find it necessary if a lot of Madrids sites are in Centro/Retiro?