1. Preheat the oven to 375°. Grease a large casserole dish or six individual casserole dishes with butter.
2. Prepare the Swiss chard: Remove the base of the stems and discard. Slice the stems about ½-inch thick and roughly chop the leaves. In a large bowl, prepare an ice-water bath. In a large pot of salted boiling water, blanch the stems until they’re nearly tender, 2 to 3 minutes. Using a slotted spoon, transfer the stems to the ice water. Repeat with the leaves, cooking for just 1 minute before transferring to the ice water. Drain the Swiss chard well and set aside.
3. Make the white sauce: In a large pot, melt the butter over medium heat. Add the onion and cook until translucent, 4 to 5 minutes. Add the garlic and cook until fragrant, 1 minute more. Stir in the flour and cook until the mixture has a slightly toasty smell, 3 to 4 minutes.
4. Add the milk and cream, whisking well to ensure no lumps form. Cook until the mixture comes to a simmer; it should be thick enough to coat the back of a spoon. Season with salt and pepper.
5. Add the blanched Swiss chard to the white sauce, tossing well to coat the greens evenly. Scoop the mixture into the prepared baking dish or dishes.
6. Prepare the topping: Toss the bread crumbs with the melted butter and mix well to combine. Stir in the pecorino cheese. Top the Swiss chard mixture with the bread-crumb mixture.
7. Bake until the sauce is bubbly and the bread crumbs are toasted, 12 to 15 minutes. Let cool slightly before serving.
Note: This dish can be made one day ahead and refrigerated. Bring to room temperature before baking.