Yes, theoretically, and no for practical purposes.
Here's the Yes part:
If you have access to a chemistry lab, you can certainly analyze the dish for the presence of specific molecules that would indicate the presence of specific spices. For example, the presence of "cinnamaldehyde" would indicate that cinnamon was used.
Here's the No part: