I suppose it depends a little bit on perspective. São Paulo is beyond the Tordesillas line (I believe....) and was founded before the Iberian Union.
It does depend on perpective, the Tordesillas line was placed at different meridians, carthography was not precise enough at the time and the treaty also wasn't enough, there would even be debates about what size of league should be used. Anyway, the Portuguese didn't consider São Paulo on the Spanish side, and most maps used today at least in Brazillian history books interpret the line somewhere between 48.5º and 49.5º. But many maps including Spanish maps like the map of Diego Ribeiro (1529) show the line at the mouth of the Plate River and west of Marajó Island.
I don't know if "sharing settlements" is quite the right word. It's true that the Iberian union significantly increased the movement of people to colonies of the other country (at least where they were allowed, I don't believe there were lots of Portuguese people in Mexico or Spanish people in India, for example, but I digress), but the empires remained very administratively separate and I believe it was very clear which cities belonged to the council of Portugal. But anyway, I'm not an expert,
They shared settlements in the sense that Portuguese people loyal to Portugal and Spanish people loyal to Spain were able to live at the same settlements and did so mainly where there was better opportunity like in Buenos Aires, a place that the Spanish Crown and the Castilians in Europe ignored most of the time.
but it doesn't seem to me that Brazil's southern expansion was driven by Portuguese people moving into Spanish settlements for trade and eventually overwhelming the Spanish population.
Yes, but that is obvious, I never said that the Portuguese overwhelmed the Spanish by demographic growth, on the contrary I said that the main events of the Portuguese expansion were the founding of Belem, the expedition against the missions in Guayra, and the settlement of Santa Catarina. What I mean is that before the Iberian Union there was a great deal of respect to the treaty that basically evaporated after the Iberian Union and to be honest, maybe even more important than that, after the Restoration War (1640-1668).
Rather, it was driven by people leaving Portuguese settlements in organized migrant groups and forming new settlements beyond the Tordesillas line.
I believe that this would most likely have happened with or without the Iberian Union as it was the result of Brazil's natural population increase. Now, would the Spanish have put an end to it without the Iberian Union? I honestly doubt it. They had a lot on their plate in the 17th century, and considering that they don't know about the gold yet, I don't think that Brazil would rank very high in their list of priorities.
It most probably wasn't populational pressure because populations started to shift to the interior only after gold was discovered in Minas Gerais and they stopped there until the 19th century, before the gold rush the frontiers were expanded by expeditions conducting slave and gold hunting, but if they had been settled because of populational pressure we should expect them to be followed by other settlements around it, but that didn't happen. For example Curitiba, it was built around 1649, but the region next to it (Ponta Grossa) remained almost empty for more than a century, the same in the Capitaincy/Province/State of São Paulo where the lands west of Bauru were left to the wilderness and the natives up to middle to late 19th century.