As the soon-to-merge Poland and Lithuania conquered Latvia (1562), little did actually change “on the ground”. German nobility continued to own the land, while the ethnic Latvian majority remained peasants. Centuries of prior Germanic rule and Lutheranism left Latvians different from Lithuanians, and so the two Baltic nations never became one, their boundary forever remaining at where the Livonia-Lithuania borderline stood at before 1562.
After the 1562 conquest Latvia was partitioned into several distinct territories. Latgale (Eastern Latvia) fell under a direct rule of Polish-Lithuanian Commonwealth. Supported by nobility-funded churches, Catholic faith there successfully withstood the rise of Lutheranism. The old German leaders were joined by newly arrived Polish-Lithuanian elite in the local high society.
Courland and Semigallia (Southern and Western Latvia), on the other hand, remained merely a fief of Poland-Lithuania. The immediate lords of the land were Dukes Kettlers (descendants of the final Livonian Order grand master) and their naval power was no joke. They even launched a colonial campaign in Africa and the Americas, becoming the least populous country to do so (Courland-Semigallia had merely 300 000 people at the time). Akin to the duchies of northern Germany, Courland-Semigallia was staunchly Lutheran.
Vidzeme (Northern Latvia) that included Riga, already a massive city, was the most prized possession, but it was also the one Poland-Lithuania enjoyed the shortest. Absorbed into the Commonwealth at 1581 (after a brief “free city” period) Riga and entire Vidzeme was lost to the Swedes in 1621 war. Riga then became the largest city of Sweden (surpassing Stockholm).
This defeat was merely a warning to Poland-Lithuania about what was to come. In 1655 the entire Commonwealth was temporarily occupied by Russia and Sweden, with Latvia falling under the Swedish occupation. While Poland-Lithuania was liberated by 1660 (and retained Latvia save for Vidzeme), this was the beginning of the end. Not just to Poles and Lithuanians, but to Latvia‘s Germans as well: using the turmoil, foreign powers stripped Courland-Semigallia of its overseas colonies.
The upcoming 18th century would be that of waning power for both Poland-Lithuania and Sweden, both of them at mercy of strenghtening Russia. And Latvia was to be once again merely one of the possesions to change hands.