In a saute pan or skillet, heat the oil over medium heat. Add the sliced onions and cook until soft and browned, about 7 minutes.
Add the membrillo to the onions and stir to coat. Cook for a couple of minutes, stirring often. Spread the onions evenly in the bottom of a 9 x 13 inch baking dish.
Heat a large pot of salted water over high heat. Cook the macaroni until al dente, according to package directions. Drain, return to the pot, and set aside.
While the macaroni is cooking, melt the butter in a medium saucepan. Whisk in the flour and continue to whisk constantly until smooth for about 1 minute.
Slowly whisk in the milk and heat, whisking constantly, until it starts to bubble and thicken. Remove from the heat and season with salt, pepper and nutmeg. Stir in 2 cups of the manchego and all of the Parmesan, until melted and smooth, reserving 1/2 cup of manchego for the top.
Pour the cheese sauce into the pot with macaroni and stir to combine. Taste and adjust seasoning to taste.
Spread the macaroni evenly over the onions in the baking dish. Sprinkle with remaining cheese and a little paprika. Bake for 25 minutes, or until golden and bubbly.