Flatness-Aware Prompt Selection Improves Accuracy and Sample Efficiency