In a lot of shows, a character's eyes (pupil and iris) will begin to shake when they are surprised or shocked? What is the basis of this, and where was it first used?
I think it might be universal as Mysticial mentioned in the comments above, your eyes waver or tremor when you express emotions such as fear, sadness, elation etc.
"The eyes are the window to the soul…"
I don't think it has a set origin, just one of those things that anime inherits from real life. Showing emotions in anime can be hard but not as much with some of those big doleful eyes with multiple catch lights.
Eyes are an absolutely fantastic way for having your character convey emotions without actually saying a word. Sometimes a scene can be much more powerful when no words are spoken, but a character's eyes do the talking. This definitely happens in anime quite a lot. While most people think of big, bright eyes in anime, there's actually a lot more to it than that.
I agree that this is something anime inherited from real life. It is said that
Once in a while, TV shows (including anime) does something that actually happens in real life (source).
And I think that this trope originated from this quote,
"The eyes are the window of the soul."
who was said by a lot of famous people in the history such as Shakespeare, Leonardo da Vinci, Hiram Powers and a lot more. Through the eyes, a person's emotions can be seen.
Many anime and manga characters feature large eyes. Osamu Tezuka, who is believed to have been the first to use this technique, was inspired by the exaggerated features of American cartoon characters such as Betty Boop, Mickey Mouse, and Disney's Bambi.4 Tezuka found that large eyes style allowed his characters to show emotions distinctly. When Tezuka began drawing Ribbon no Kishi, the first manga specifically targeted at young girls, Tezuka further exaggerated the size of the characters' eyes. Indeed, through Ribbon no Kishi, Tezuka set a stylistic template that later shōjo artists tended to follow.
This is probably what anime productions followed (since most of the anime were based from manga). They used the eyes to show or exaggerate emotions to fully relay to the audience what the character is feeling.