Generalized Whittaker vectors for holomorphic and quaternionic representations