When it comes to Nintendo they usually have no problem with backward compatibility, but it seems to look like the Switch will not be able to play 3DS cards or Wii U Discs. In an interview with Famitsu, a Nintendo representative had answered the question.
Since the Nintendo Switch is not a Wii U or Nintendo 3DS successor machine, you can not play with Wii U disk software and Nintendo 3DS card.
It’s quite obvious that you won’t be able to put in a Wii U disc since it only uses cartridges, but I guess the 3DS cartridge is a bit different compared to the new Nintendo Switch. Who is to say you can’t download the games digitally that are from those systems.
We still await more information on the Nintendo Switch and we should be getting new info more often now.