Closed End Funds have come up as a topic on this forum before, most recently about two weeks ago.
It's a broad topic, including the question of discounts.
A CEF selling at a non-trivial discount to NAV is not some kind of flaw in efficient markets, nor is it necessarily a free lunch for investors. Rather, as an investor in such a CEF, you cannot generally take ready advantage of the discount (i.e. by, say, demanding that the fund redeem your shares at NAV). And as a buy and hold investment, a discounted CEF may be considerably WORSE than a comparable low cost ETF or OEF (i.e. In particular if the expenses of the CEF are high.)
If fund management were always looking out for the best interests of investors, they would be quicker to take various measures (buy backs, tenders, liquidation, merger with an OEF) to reduce the discount, when such a discount is wide and persistent. But, among other things, that would reduce assets under management, and generally reduce fee revenue to the managers.
If investors were well informed and pro-active, they would be quicker to force these actions themselves (voting in board members and activists who would pro-actively reduce discounts). But CEF owner/investors are often passive and it can be difficult and/or expensive for an activist to unlock the value discrepency between NAV and a discounted market price.