Make the sofrito. Heat 2 tablespoons olive oil in a large saucepot over medium heat. Add onions and season with salt pepper. Cover the pot and saute for 5 minutes. Remove lid and add garlic and green bell pepper. Continue to saute for 5 more minutes or until peppers are softened.
Add red wine and bring to a boil. Continue to simmer until almost all of the wine has evaporated. Add tomatoes, paprika, oregano, cumin, and rosemary, stirring to combine. Bring to a simmer, reduce heat to low, and continue to simmer for about 50 minutes - 1 hour, mashing tomatoes occasionally to release their juices. The sofrito should thicken and reduce by about ⅓. Season with salt and pepper and set aside.
Meanwhile, caramelize the leeks. Heat 1 tablespoon olive oil and 1 tablespoon butter in a large saute pan over medium heat. Add sliced leeks and season with salt. Continue to cook until leeks turn deep golden brown, stirring frequently. If the pan becomes too dry, add a splash of water.
Add another tablespoon of oil to the pan and add garlic, red chili flakes, and spinach. Saute for 4-5 minutes or until garlic is golden brown and spinach is wilted.
Cook pearl couscous according to directions on package. Drain and add to the saute pan along with 1 cup sofrito sauce and ricotta. Stir to combine and season with salt and pepper.
Transfer jammy sofrito couscous onto a serving plate and top with toasted almonds, parsley, basil, and grated parmesan. Serve immediately.
Notes
The sofrito can be prepared up to 5 days in advance. This recipe makes extra sofrito. Reserve the remaining for another dish or freeze the sauce for up to 3 months.