Heat oven to 200C/180C fan/gas 6. Toss the tomatoes with the oil, rosemary, bay leaf, garlic and shallots in a roasting tin. Season well and roast for 30-45 mins until the tomatoes are soft, concentrated and spilling their seeds and juices into the olive oil (cover with foil if browning too much). Discard the bay leaf and rosemary.
While the tomatoes are roasting, make the breadcrumbs. Blitz the stale bread in a food processor. Heat the olive oil over a medium heat, then add the anchovies and cook for a couple of mins until dissolved into the oil. Add the lemon zest and chilli flakes and stir to infuse the oil, then add the breadcrumbs and fry for 4-5 mins until crisp, deeply golden and dry, stirring to make sure they don’t catch. Set aside.
Cook the pasta in plenty of boiling, well-salted water until al dente. Drain, reserving a cup of the pasta water. Place the roasting tin over a low-medium heat on the hob and pour the pasta into the tomato mixture, along with a generous slug of the pasta water. Cook for a couple more mins, shaking the tray and tossing to coat the pasta in the oil and juices. Divide between warm bowls and top with spoonfuls of ricotta and the anchovy breadcrumbs.