I am responding to your comment in the answer column because of the length of my reply.
Herein lies, I suppose, the difficulties of trying to transpose the peculiar nuances of one language into another and willing them to come up an exact fit. It is, in my view, asking too much of two languages which have many grammatical, syndetic differences.
Therefore, the particular lexical definitions and contextual usages of English words like "purpose", "objective", "target", "intention", "goal", etc, may or may not find their exact twins, in body and soul, to satisfy your understanding of their counterparts in Chinese words on offer.
All I can offer you at this juncture of your Chinese learning journey, (a journey we are all on), is that it takes time, effort and a further understanding of the nuances of the Chinese language to answer your question -- "...But how could I know, out of context, if something is a target or a goal per se..."
Perhaps others with greater knowledge of the language around here could offer a better answer, or advice, to a very good question from you which was why I gave that up-vote.
Finally I am sure with further studies of the language, (like your command of the English language) you will soon realize the subtle differences between 目的 and 目标 and perhaps many others beside.
BTW, for "my goal is to speak Chinese fluently" would be 我的目标是流利地说中文
Why 目标 and not 目的?
Because, to make it 目的, you would need to say -- "The purpose of my attending more classes is to speak Chinese fluently" -- 我参加更多课程的目的是流利地说中文。
The above, commensurate with my particular ability, is the best I could do.