The over-provision of demerit goods and the under-provision of merit goods may result from imperfect information about the long-termimplications of consuming the good.
E.g. education would be under-provided in a free market, because teh long-term benefits of it are not accounted for in society.
Not all products that result in positive or negative externalities in consumption are either merit or demerit goods.