Yes, and maybe.
In real estate, location is a primary factor in assessing the valuation of a property. Obviously, features such as spectacular views, waterfront, easy access to popular amentieis, etc., appeal to the masses and therefore add to the fudamental value of the property.
On the flip side, a less desireable location such as next to a highway or on a busy street, in a flood zone, and yes, with close proximity to a landfill, can decrease the value of property.
Whether or not you will have a hard time selling in the future depends on how well these properties have always sold and sell now. If there is a good sale history of the homes around the landfill, it shows that people are willing to accept this location in exchange for affordable property. Obviously, the location will have to be taken into consideration when you resell and priced accordingly, and it will have to be positioned just so. You are considering a purchase; it is likely someone else will in the future for the very reasons you are.