MDF, as a general building material, does have its flaws: it doesn't take well to moisture; it tends to warp; etc. As for lumber, even though it does have a grain and can split, I find it easier to work with than MDF. It's "real wood," and it doesn't crumble like MDF does. Baseboard edges are less susceptible to chipping when things hit them. It's a much more forgiving material than MDF is.
In general, if price is the issue, then I don't see anything wrong with using MDF for trimwork. It's so heavily primed and painted that moisture doesn't affect it (it will probably come primed). And it's nailed down so thoroughly that warping isn't an issue--not to mention, you're not using it for structural purposes anyway.