Understanding Prompt Tuning and In-Context Learning via Meta-Learning