From C. Li, S. Thompson, Mandarin Chinese: A functional reference grammar:
This category of questions explicitly presents the respondent with a choice of two or more possible answers connected by 还是, which may be called constituents. The syntactic nature of the connected constituents may vary from question to question, but all such constituents within a question are of the same syntactic type. Some examples of constituent types:
Verbs:
你走还是跑? Will you walk or will you run?
Direct objects:
你买这个还是那个? Will you buy this one or that one?
Subjects:
张三还是李四讲话? Is Zhangsan talking or is Lisi talking?
Coverb phrases:
他在这儿还是哪儿住? Does she live here or there?
Adverb phrases:
他今天还是明天来? Is he coming today or tomorrow?
Nominalized adjectives:
那本书是红的还是白的? Is that book red or white?
So coming back to your question, both examples are fine: in 你喝茶还是喝咖啡?the constituents are verb phrases, while in 他学习日语还是英语?the constituents are direct objects.