Finally sending an idea out to an agent or a publisher is always an act of faith. Faith in your own ability and in your own judgement. The trouble is that when ideas get turned down it can make this faith seem completely misguided. . . That depends on your mental resilience of course. I always say, somewhat flippantly, that there are two ways people react to rejection, one is to conclude that they are total rubbish and have rubbish ideas, and the other is to take the attitude that 'the fools don't appreciate my genius'!
The latter is probably better for your sanity, but rather too close to delusion perhaps, and the former is just defeatist.
Having faith in your own judgement is a big part of being a writer, (and any other kind of creator or maker) and that faith is a fragile thing so you have to look after it ;-)
Easier said than done, I know.
Rejection is part and parcel of being a writer, it's not pleasant, but its a fact of life and has to be accepted as such otherwise no one would ever send their precious ideas out into the world at all.
So us writers and illustrators work hard on our ideas, tweaking and revising to make them into something a publisher can look at and see how they would work as books. The difficult bit is knowing when an idea has reached that point, knowing when to stop tweaking the idea and submit it. Knowing when to jump. . . Is it underworked or overworked? Too loose or too prescriptive?
You hope you have worked hard enough and got the idea as 'right' as you can get it because once something has been turned down, you can't really tweak it and send it in to the same person again to see if they like it with your added 'improvements'. They won't have the time or patience for that.
There are no doubt exceptions to this, but generally, if a publisher or agent is interested in an idea they will make some allowances, and will often suggest ways to make it work better if such is needed. If they aren't interested, they won't be willing to spend their precious time analysing it and telling you why it doesn't appeal.
So, do you tweak your idea and send it to someone else?
The trouble is, it is impossible to know why an idea gets rejected. There may be two people in a meeting who are mad about it, but three who weren't keen. There may be two really good ideas on the table and only one slot in the Spring list, so someone has to lose out. Or it may be because your idea is rubbish and nobody in their right mind would touch it with a barge pole. . . It's unknowable, so really it's not useful to speculate too much. Also, to complicate things still further, your 'improvements' might not enhance the idea at all, and the next person to see it may have preferred the first or untweaked version had they seen it. . . Or not. . . You could drive yourself nuts with this stuff.
So really, you have to put the effort in and have faith. Get an idea to the point where you like it and you think it 'works', then let it go knowing you have done your best. If it doesn't find a publisher, move on. You will keep having ideas.
Some might be rubbish ideas, as writers can easily be too close to an idea to fully judge its value, and of course the last thing you'll have wanted is to have spent your precious time and energy in the ultimately futile pursuit of a rubbish idea. But on the other hand, often the only way you can get an idea to the point where you can make some kind of judgement of its worth, is by putting the time and energy in and seeing how it turns out. 'Wasted' time is a given. It's part of the deal.
Only you can decide if your continued faith in an oft rejected idea is misplaced. You may get a flash of inspiration and find the perfect way of making your idea work, or you might find that you have just added more wasted time to time previously wasted. Are you being laudably persistent or are you flogging a long dead horse? I've been in both situations so I can't really offer useful advice on how to tell the difference other than by the result, or lack of it.
Basically I think we are all winging it and hoping for the best, argubly from an increasingly informed perspective as time goes on, but don't quote me on that. ;-)
Good luck btw. . .