Chances are, in a situation where Spanish came to be the primary language of Brazil, Brazil itself isn't likely to be unified. Brazil was really tied together as a single nation due to the relocation of the Portuguese court to Rio de Janeiro. Before the arrival of the Portuguese Court, "Brazil" was really a just a couple of contiguous colonies rather than a truly unified entity (Brazil was under the same Viceroy, but look at how the Spanish Viceroyalties turned out). Something similar almost certainly won't occur in a timeline where Brazil is Spanish speaking, given the butterfly effect. Without this unifying presence, Brazil has a strong potential to balkanize upon Independence (given that even IOTL there were a number of separatist attempts).
This of course assumes that Spanish speaking Brazil would have the same population structure as Portuguese speaking Brazil in 1820, which isn't remotely assured (and thus changes the dynamic of things quite a bit). If Spain colonized Brazil by itself, the population of Brazil would be quite a bit lower (Portugal sent more colonists to Brazil than Spain sent to her entire empire), and spread out differently.