I have fed zucchini to bristlenose plecos for years. I blanch it and then when it sinks I drop it into the tank. I also use a veggie clip to attach it to the glass. I mostly feed in the evening and I leave the it in the tank overnight and often until the following evening. By then it is usually all eaten, but, if not, I remove what is left. This has never been a problem for me.
My amano shrimp as well as my Neocaridina davidi (both red cherry and blue dream) and even the assassin snails eat it as well as the brisltenose. Even some of the corys hit on it.
How long one can leave any food in the tank depends on the food. If we do not over-feed, there should not be much left to clean up. But some fish are grazers. Think algae eaters for one, another example are discus. There are also foods that break down more slowly than others. What we do want to avoid is over feeding or letting excess food just sit. There is a difference between it getting soft and having it start to fungus. It is a case of using some common sense. A couple of flakes of uneaten food is one thing, piles of rotting food are another.
If we pay attention we should soon learn how much to feed our fish and how often. It is better to start by feeding too little and have to increase the amount than the opposite.
As always, this is just my opinion. Feel free to disagree. What matters is that our fish get fed and that feeding doesn't become an issue.