Pasta e fagioli is indeed a clean-out-the-fridge thing, and every region has its own rough version of it. Basically the first-stated recipe is normal: sweat some veggies and some cured pork products (it's best with these, but it can be made vegetarian if you like), add beans and herbs, add water and simmer until the beans are just tender, add salt and simmer until beans are almost perfect, then add a handful of smallish dried pasta. A hard cheese rind (from Parmesan, one of the Pecorino cheeses, etc.) added with the beans and water will improve matters, as will simmering a ham bone in it. You can put almost anything into it; the only rule is that some vegetables should cook less time than others, and you should bear that in mind. For example, diced zucchini should go in near the end, with the salt, or it'll turn into mush. Tomatoes in it is, as far as I understand, one of those contested regional things. The really big question is which beans to use, actually, and again that's very regional. Pick whatever beans you like (though I'd stay away from black beans!), but I'd put kidney beans last on the list. Try cannellini, for example, or borlotti, or just grab some Great Northerns or Pintos or whatever strikes your fancy. In time, you'll come to like some beans better than others, which is perfect.
Four suggestions on serving:
(1) Everyone should be given the opportunity to grate on fresh hard cheese, grind on black pepper, and garnish with fruity extra-virgin olive oil.
(2) It's good the first day and better the second.
(3) In winter, water down the leftovers a tad and ladle over a thickish slice of yesterday's country bread, then wait a few minutes for the bread to get soft and tuck in.
(4) In summer, serve it at room temperature -- not cold, but room temperature. If you've used fresh summer vegetables, and serve it this way, it's a real old-fashioned country delicacy.