There are no rules covering this type of situation
As such, the answer is most directly indefinitely, but you can extrapolate from other rules to get an idea of how to handle this situation more appropriately.
Squeezing
This type of binding is highly similar to the squeezing mechanic which allows a creature to squeeze into a tighter space (see the Combat section in the Player's Handbook). Squeezing in such a way could be considered strenuous activity and as such, the goblin would be unable to rest.
Exhaustion
Being unable to take long rests (sleep) will result in the accumulation of Exhaustion. If the rope was loose enough to rest, you could still suggest it wasn't a "good rest" and have the goblin gain Exhaustion anyway (just at a slower rate).
There are no rules to cover the lack of sleep in the Player's Handbook, but Xanathar's Guide to Everything does make a suggestion that is outline in this answer to a question about lack of sleep. You could say that the creature has advantage on the saving throws since he is able to rest a little, but just not as well as if he wasn't bound.
How long?
Using rulings based on the above applications, the average survival time is 6.9 Days. If you choose to give the goblin advantage since he at least gets some rest, the average survival time goes to 7.405 Days. The math can all be found below.
Assumptions
- The goblin starts with no Exhaustion.
- The goblin has 10 Constitution (a +0 modifier).
- The goblin is unable to rest due to the bindings. (If you give advantage on checks due to some rest, see footnote1)
Given
- The goblin will die as soon as day 6 since six levels of Exhaustion results in death.
- The goblin will always die by day 9 since the DC to avoid Exhaustion after day 4 is greater than 20 (the maximum Constitution save possible from the goblin).
The Probabilities
Day 6 Death
- He must fail all saves
- P = 0.45 * 0.7 * 0.95 * 1 *... = 0.299
Day 7 Death
- He must succeed one of the saves on day 1-3 and fail the rest
- Succeeding Day 1
- P = 0.55* 0.7 * 0.95 * 1 *... = 0.366
- Succeeding Day 2
- P = 0.45 * 0.3 * 0.95 * 1 *... = 0.128
- Succeeding Day 3
- P = 0.45 * 0.7 * 0.05 * 1 *... = 0.015
- Overall Probability (SUM) is 0.510
Day 8 Death
- He must fail only one of the saves on day 1-3 and succeed on the other two
- Failing only Day 1 (and day 4+)
- P = 0.45 * 0.3 * 0.05 * 1 *... = 0.007
- Failing only Day 2 (and day 4+)
- P = 0.55 * 0.7 * 0.05 * 1 *... = 0.019
- Failing only Day 3 (and day 4+)
- P = 0.55 * 0.3 * 0.95 * 1 *... = 0.157
- Overall Probability (SUM) is 0.183
Day 9 Death
- He must succeed on the saves for day 1-3 (and fail the rest)
- P = 0.55 * 0.3 * 0.05 * 1 *... = 0.008
Then take the weighted sum of the probabilities
- 6 days * 0.299 + 7 days * 0.510 + 8 days * 0.183 + 9 days * 0.008 = 6.9 days
1For the math with advantage, change all instances as below
- 0.45 to 0.2025
- 0.55 to 0.7975
- 0.7 to 0.49
- 0.3 to 0.51
- 0.95 to 0.9025
- 0.05 to 0.0975