TL;DR Attempt 4 should be what you are going for.
I'll attempt to analyze it linguistically:
First, we need to confirm the sentence follows the SVO structure, which is used in Standard Chinese.
In English, the past participle "left" is used as an adjective, thus we have the following:
- S: We
- V: have
- O: one carrot
However, in Chinese, 剩下 and 只有 are both verbs. Thus, using both at once would logically require multiple clauses. Now, we can eliminate sentences that does not obey the SVO pattern. Be careful of invisible part-of-speech conversions (轉類) in Chinese.
- Attempt 1: 我们S 只有V 一个红萝卜O 剩下V。 Incorrect. It is fine using this informally, but this should be grammatically incorrect.
- Attempt 2: 我们S 只有V 一个(剩下的 adj)红萝卜O。Correct
- Attempt 3: 我们S 只有V 一个(剩下着 adv)红萝卜O。Incorrect. Only adjectives qualify nouns. Adverbs qualify verb. Also, I haven't even heard of "剩下着" as an adverbial phrase.
- Attempt 4: 我们S 只剩下V 一个红萝卜O。 Correct
- Attempt 5: 我们剩下的S 只有V 一个红萝卜O。 Correct
So preliminarily, Attempt 2, 4, 5 are grammatically correct.
Let us analyze the grammatical sentence structures:
Attempt 2
我们 只 有 一个 剩下的 红萝卜。
Level 1: \-S/ \--------Predicate--------/ A: Adverbial
Level 2: \A/\H/ \-----Object------/ P: Predicator
Level 3: \P/ \-M-/\---Head-----/ M: Modifier
Level 4: \-M/的 \-Head/ H: Head
*A-H structure is formed with an adverbial (adv.) and a predicator. M-H structure is formed with a modifier (adj.) and a noun/complement. A numeral-classifier (一个) is analyzed as an adjective.
From this analysis, we can see we can approach this context from the most general to the most specific meaning:
- We have a carrot.
- We only have a carrot.
- We only have a carrot that is remaining.
Attempt 4
我们 只 剩下 一个 红萝卜。
Level 1: \-S/ \--------Predicate---------/
Level 2: \A/\-Head/ \---Object---/
Level 3: \P/ \-M-/\--Head-/
The context:
- We have remaining a carrot.
- We only have remaining a carrot.
Attempt 5
我们剩下的 只 有 一个 红萝卜。
Level 1: \Subject/ \------Predicate-------/
Level 2: \A/\H/ \---Object---/
Level 3: \-M/\--Head--/
*This subject uses "Normalization", a technique in grammar to transform a verb into a noun. Here, "我们剩下的" means "What we have remaining". Otherwise, you may treat this as missing the Head in an M-H construct: "我们剩下的(材料)" The ingredient we have left.
Context:
- What we have remaining is a carrot.
- What we have remaining is only a carrot.
Now, with the context already laid out in English, it is not hard to understand the different nuance of the several grammatically correct attempts.
- Attempt 2: We only have (a carrot that is remaining).
- Attempt 4: We (only have remaining) a carrot.
- Attempt 5: (What we have remaining) is only a carrot.
As you can see, each of these sentences have the idea "remain" in different sections of the sentence.
- Attempt 2 focuses the carrot. How is the carrot? What is the state of the carrot?
- Attempt 4 focuses the action.
- Attempt 5 focuses the subject.
Attempt 4 should be what you are going for.
Conclusion
In general, sentence structure analysis is really useful in discovering the nuance of a sentence, and for validating whether a sentence is grammatically correct or not.
By first stripping out all the quality in the sentence, simplifying it into the most basic SVO structure, we can reconstruct the sentence context step by step.