Well, let's use a little game theory. There are four possible outcomes:
1.) You do not contribute / project succeeds - The project will go on with or without you. In this senerio, you have not wasted any work hours and the company itself does well, which means you do well. Your objection to the usefulness of the project has proven to be incorrect. Result = No work hours lost.
2.) You do not contribute / project fails - Again, you have not wasted any work hours. But the project has now failed, which may impact the company (which is what you feared). Your reservations have been justified, yet there is the small possibility that failure may have been averted had you contributed. Result = Self justification.
3.) You do contribute / project succeeds - You put in the extra work hours and the project does do well, which means you do well. Your objections have been proven incorrect, but you contributed to the success anyway. Result = Contributed to a successful project.
4.) You do contribute / project fails - You put in the extra work hours and the project still fails. Your objections have been proven correct and the company does poorly. On the plus side, your contributions did not result in the failure. Result = Wasted work hours.
If we assume that the project will succeed or fail whether you contribute or not, then not contributing will have no effect beyond not wasting work hours. If we assume that your contribution will be the deciding factor between success or failure, then not contributing could doom the project.
It's my analysis that you should contribute. You cannot stop the project and the worst that can happen is that you have wasted work hours. If you do not contribute, the worst that can happen is that the project fails because of your lack of contribution.