There's quite a few "v. 不好 n." phrases in Chinese, such as:
睡不好觉
写不好字
讲不好故事
唱不好歌
弹不好吉他
They all seem a bit ambiguous to me: the 不好 could modify the verb to imply the verb is performed poorly, or the 不好 could modify the noun to imply the noun is "bad" in some way.
If we add a 了, the 不好 seems to modify the noun:
睡了不好觉 (slept a bad sleep)
写了不好字 (wrote a bad hanzi)
讲了不好故事 (told a bad story)
唱了不好歌 (sung a bad song)
弹了不好吉他 (played a bad guitar)
But if we reorder the sentence and add in a 得, the 不好 modifies the verb:
觉睡得不好 (poorly sleep a sleep)
字写得不好 (poorly write characters)
故事讲得不好 (poorly tell a story)
歌唱得不好 (poorly sing a song)
吉他弹得不好 (poorly play the guitar)
Hence this makes me think the original phrases are ambiguous. Hence the question...
Question: Are "v. 不好 n." sentences inherently ambiguous in that 不好 could modify the verb or noun?
I ask this question because I encountered 很多小学生学不好代数 at Tatoeba, and here it seems fairly clear from context that 不好 modifies the verb ("poorly studied algebra") and not the noun ("studied bad algebra"). I'm not sure how to wrap my head around this.