Cook the spaghetti in salted water following the instructions on the packet.
Pour a little extra-virgin olive oil into a fairly deep frying pan and sweat the sliced onion and garlic.
Add the chopped chorizo and stir well. Add salt, pepper and oregano, followed by the tomato passata, and cook well to bind all the flavours together.
Add the strained pasta, check for salt and stir for a few minutes over a low heat.
Transfer to an oven dish, sprinkle the cheese on top and grill at 180 ºC until the cheese has melted.