Is there a solution for this maze problem in polynomial time?
If the number of keys is unlimited, the problem is NP-hard, by a straightforward reduction from the traveling salesman problem: simply put a different key in each vertex,  and have a single chest that requires all the keys.