How and when did Jews get to the shores of the Baltic?
The first rule about Jewish migrations is that Jews generally traveled "the path of least resistance". They moved to those places where they had most freedom and the least fear or persecution and repression.
The Aschenazic Jews and their traditions arose originally in the Southern Europe - particularly Italy (Rome), then on to France, Central Europe and Southern Germany. Dating back to the days of the Roman Empire, where Jews were relatively free and had many civil rights:
While the treatment of Jews by the Romans in Palestine was often harsh, relations with the rulers in Rome were generally much better. Julius Caesar, for example, was known to be a friend of the Jews; he allowed them to settle anywhere in the Roman Empire.
Hellenistic Judaism, originating from Alexandria, was present throughout the Roman Empire even before the Roman-Jewish Wars. As early as the middle of the 2nd century BC, the Jewish author of the third book of the Oracula Sibyllina, addressing the "chosen people," says: "Every land is full of thee and every sea." The most diverse witnesses, such as Strabo, Philo, Seneca, Cicero, and Josephus, all mention Jewish populations in the cities of the Mediterranean Basin.
Persecution of Jews in Europe reached a "high water mark" (neither the first, nor the last, of such) in the High Middle Ages in the context of the Crusades.
The Crusades were followed by expulsions, including in, 1290, the banishing of all English Jews; in 1396, 100,000 Jews were expelled from France; and, in 1421 thousands were expelled from Austria. Many of the expelled Jews fled to Poland.
By the 13th Century, migrating northwards and eastwards from Western and Central Europe, as explained above, Jews had a significant presence in Poland
While persecution took place across Europe during the Crusades, in the 13th century, Poland served as a haven for European Jewry because of its relative tolerance.
By the 14th Century, Lithuania was becoming more and more of a home for Jews and a bastion of Jewish culture and learning:
Jews have lived in Lithuania since the 14th century. They came at the invitation of the Grand Dukes Augustus II and Augustus III, who had recognized the utility of the merchants, artisans, and traders as an integral component in the development of the nation. Jews also played important roles in diplomatic missions and defense.
So that's the general pattern and timeline - slowly northwards and eastwards, until by the 15th and 16th Centuries, there were significant focal points of Aschenazic Jewish population and culture in north-eastern Poland and the southern Baltic regions, also spreading eastward into Russia. These migrations left large Jewish communities throughout central Europe - in Austria, Hungary, Czechoslovakia, etc. in their wake. If you trace the timelines, generally, the further west and south you go from the Baltic region, the older the communities are. A significant Jewish presence in Prague, for example, dates back to the 11th century:
Documentary evidence reveals that Jews have lived in Prague since 970 C.E. By the end of the 11th century, a Jewish community had been fully established.
Jews have a mixed history with Vienna, ranging from prosperity to persecution. After the first influx of Jews arrived in Vienna in the late 12th century, 16 Jews were murdered by Christians, with the blessing of the pope.