No — and buying the engine later does not fix it.
The infringement happens at the moment you download and use software you are not licensed for. Copyright covers copying and unauthorised use, and that line is crossed immediately. A later purchase is a new licence going forward; it does not retroactively authorise the copying that already took place, in the same way that paying for a stolen item after the fact does not make the theft lawful.
There is a second layer, too. Commercial engines ship with licence agreements that govern what you may do with the software, and those terms typically include provisions about the date from which your licence applies. Many also require that any distributed work be built with a legitimately obtained copy, which means the released game itself becomes a problem, not just your machine.
The practical advice is unglamorous: use a genuinely free engine while you are learning. Several production-grade options cost nothing for small and non-commercial projects, so there is no reason to start on borrowed software.