It is to my understanding that during Roman times, the lands to the north of imperial borders like Germania were frigid, covered with forests, unfriendly to agriculture, and overall not worth settling. Yet in modern times, northern countries like Germany and the Netherlands are some of the wealthiest and most densely populated parts of Europe. What changed that allowed these lands to become so prosperous and fertile?
In short, trade and industrialization. The long answer is a bit more complicated.
First, it's not entirely true that everything north of the Roman border was inhospitable. To the Romans, and their Mediterranean sensibilities, these places might have seemed forbidding, but don't forget that there were plenty of people already living there. While the Romans are famous for their urban engineering, in the hinterlands there was not as much that differentiated a Roman village from a Germanic or Celtic one. Also worth remembering is that Rome did occupy some of the most densely populated parts of modern-day Germany and the Netherlands. The provinces of Germania Inferior and Germania Superior, which was centered on the Main and Rhine Rivers, were quite prosperous parts of the Roman Empire, and are home to some of the best-preserved Roman architecture. Initially, Rome had hoped to annex all of Magna Germania, but the Roman defeat to a coalition of Germanic tribes at Teutoburg Forest (as chronicled most notably by Tacitus) put a halt to this plan. It's not that the lands beyond the Roman border were worthless, but rather that they weren't profitable enough for Rome to invest the resources that would be required to subdue them. Also, beyond the forests and hills of Western Germany lies the Great European Plain, which is one of the most agriculturally productive regions in Europe. The plain was once forested, but then again so was most of Europe.
The early medieval period was dominated by the Germanic migrations and the later rise of the Frankish Empire, which was centered on what is now Western Germany- the Frankish homeland. Cities like Aachen and Cologne arose during this period as commercial and political hubs of the Frankish Empire. With the notable exception of the papacy, the balance of power in Western Europe had shifted North.
Fast forward a little bit, and we'll encounter Europe's hottest commodity: wool. It gets glossed over sometimes, but the textiles industry is arguable the most important driver of development in Western economic history. Everybody needs fabric. In Europe, which is a relatively cool, wet continent, you need warm fabric. Most of Northwest Europe is prime territory for sheep farming, and the Low Countries were ideally located between the most important centers of wool production. The towns of Flanders, especially, became centers of woolen textile production, processing raw materials from nearby regions and selling them across Europe and beyond. Flemish wool traders built up a massive supply infrastructure in England, right across the Channel. According to Eileen Power's history of the European wool trade, Flanders became the center of the wool trade despite the coarser quality of English and Scottish wool compared to Italian Merino, because the soil of the Low Countries was better suited to the farming of dye plants.
From the Low Countries outwards, a great trade network emerged in Northern Europe, dominated for a time by the Hanseatic League. Trade in Northern Europe was characterized by the flow of raw materials into production centers in Northern Germany and the Low Countries, and outward as finished goods. While this trade was tightly controlled and highly competitive, it is an important precursor to early capitalism, and led to the growth of early finance.
When the first wave of European imperialism arrived, the Dutch and English were among the first to latch onto a profitable economic model based on a global network of trading outposts, and the exploitation of enslaved Africans for the production of raw materials. While the Portuguese initiated the Atlantic slave trade to supply labor to plantations in Brazil, it was the Dutch that first adopted this innovation in the Caribbean, and it was from the Dutch that the English and French learned the practice. Spanish colonialism in the Americas was, at least initially, made profitable through the conquest of the complex civilizations that already existed there. Other European powers didn't have this, so their colonial economies came to rely on trade in raw materials, produced on plantations in the Americas, shipped back to Europe for production, and then sold through a global trade network. While most European empires followed strict mercantilist policies, an early form of modern capitalism was developing in the Netherlands. Stock markets, corporations, insurance, and modern finance all began in the Netherlands, and quickly spread to England.
These new economic innovations, combined with an abundance of raw materials, especially cotton from the Americas, sparked the first industrial revolution in England. The Acts of Enclosure forced many rural peasants to abandon small-scale farming, leading to an influx of cheap labor, and the rapid growth of industrial cities dominated by... wait for it... textile production! Industrial production, and modern liberal capitalism as we understand it today, began in Britain, but quickly spread across the North Sea to the Low Countries and Germany. Germany had ample access to coal and ore, which helped it develop into an early center of heavy industry, dominated by industrial metalworking. Individual industries spill over into neighboring regions, and spark the growth of derivative industries like finance and shipping, which easy access to sea and empire facilitated.
Tl;dr: Northwestern Europe and Central Europe were never barren wastelands, and Germanic empires were able to unify fertile lands the Romans had wanted with ones they had actually controlled. The commercial towns of these regions grew into important trading centers, and the early wool trade led to the growth of wealthy cities in the Low Countries. The Hanseatic League served as an early prototype of the global trade networks which the Dutch and English built in the 17th century. Imperialism led to the Industrial Revolution, which spread from Britain to the continent, making Germany and the Low Countries into centers of industry and commerce, and some of the most prosperous regions in Europe, which they remain to this day.