Cook whole wheat pasta in salted water. Preheat the oven to 200 °.
Finely dice the onions, cut the ham into bite-sized pieces and fry both in a little oil. Rub the garlic over it and deglaze with the tomatoes. Stir the cream cheese into the sauce and mix with the broth, salt and pepper and herbs.
Pour the pasta into the sauce and stir, place in a baking dish and sprinkle with the cheese. Baked for about 20 minutes.