Preheat your oven to 350°F. Lightly coat an 11x7 or 9x13-inch baking dish with nonstick spray. Cut four slices of rye bread into 2-inch cubes.
In a food processor, crumble the remaining slices of rye bread into fine breadcrumbs and set aside.
Evenly distribute the cubed bread at the bottom of the prepared dish. Layer half of the pastrami on top.
Next, spread the drained sauerkraut over the pastrami, followed by the chopped pickles and 1 teaspoon of caraway seeds.
Sprinkle 2 cups of shredded Swiss cheese over the sauerkraut layer. Then, add the rest of the pastrami on top. Gently press down on all the layers to compact them slightly.
Top with the remaining 2 cups of Swiss cheese and another teaspoon of caraway seeds.
In a medium bowl, whisk together the milk, eggs, Thousand Island dressing, and mustard until well combined.
Pour this mixture evenly over the casserole.
Finish by sprinkling the breadcrumbs on top, then cover with aluminum foil.
Bake for 45 minutes. Once done, let it rest for 5 minutes before slicing and serving.