Are there any contracts that simply pay you when/if you finish a specific project with no mention of a fixed pay/hour? If so, does this mean you can get paid under minimum wage if you take too long to finish it?
Yes. I have personally signed such contracts (fixed budget software development) and lost money every single time. And yes, it is quite possible for you to get paid under minimum wage if you take too long.
Scope creep is the primary culprit for these kinds of contracts, so make sure you put together iron-clad explanations of what is and is not covered by the contract (and pad the asking price for good measure).
In general the other party will expect you to keep your promises. If you promise to do something for a fixed amount of money, you take on a risk and it is no longer their problem if you work slower than you planned.
In principle it could even be the case that you take on a project and fail, after which the company may not have to pay at all. So regardless of how things should be written in your books (For example a theoretical pay above minimum wage but a loss for your private company):
yes, it is quite possible that the result of your labor ends up rewarding you with less than minimum wage
An important thing to note is that if you are worried about ending up below minimum wage, you are definitely asking a fee that is too low. You should keep in mind that your fee should include a fair compensation for the expected work, and a fair compensation for the risk that you have taken on.
Software Contractors are not employees of the company that is procuring the software.
Software Contractors necessarily work for another legal business entity. There is a business to business relationship between the procurer of the software and the entity producing the software. Therefore, the company procuring the software is not required to pay a minimum wage, or adhere to any other employment law.
When any individual or company orders a software product and agrees to pay for it, that is a fixed priced contract. This happens millions of times a day. The amount of time taken to produce the software has no direct bearing on price. For instance, there is no minimum price for Microsoft Word based on the number of hours taken to produce it.
Generally a Software Contractor will be a director and shareholder of a limited liability corporation. Directors are exempt from the standard protection offered under employment law.
If the company producing the software was employing non-directors to produce the software, rather than sub-contracting to another business then employment law would apply.