Are there any algorithms for a classification problem involving unlimited classes, and only a few instances per class
Yes there are couple of methods. I recommend reading the Siamese Networks paper. From there you can check more modern approaches like Prototypical Networks and so on. In general the keyword you are looking for is few shot learning. 
All this approaches basically depend on finding similiarities between two or more inputs. One input is your unknown input and the others are your known samples. Your network will predict a class corresponding to maximum similarity.