Ever since the Switch was announced, pundits have been debating the lifespan of the 3DS. There's still plenty of stuff in the pipeline from developers like Atlus, who support pretty much every system under the sun (they're basically the reason the Vita still exists at this point), and some first party works from Nintendo.
But the fate of the 3DS is very much in question given that the Switch is by nature a portable system, something Nintendo has addressed yet again in an investor Q&A. Responding to a question regarding the 3DS, current Nintendo president Tatsumi Kimishima stated:
Consumers purchased Nintendo 3DS systems in numbers we expected last fiscal year. It has an ample software lineup at a price point that makes the system affordable esepcially for parents looking to buy for their kids. We expect that demand to continue during this fiscal year as well (March 2019), so we will continue to sell the product.
Given that the Nintendo Switch is a home gaming system that can be taken on the go, this situation may change if it grows from being a one-per-household system to a one-per-person system. But the price of the Nintendo Switch is not something with which most parents would buy a system for every one of their children in a short period of time. Moving forward, we will work to ascertain what kinds of play people want at which price points, and as long as there is such a demand, we will continue to sell the Nintendo 3DS system. I see the product coexisting with the Nintendo Switch at this point in time.
It's interesting that Kimishima notes that the Switch is too expensive to mass-buy -- from any businessman I'd expect a boilerplate "our systems are cheaper than our competition, buy three!" pitch. Either way, Nintendo seems to be happy with both systems, though it's very clear that the situation could change, as they've spelled that out. If the Switch ramps up to 30, or 40 million sold, the above statement could be their justification in terms of exiting the 3DS market.