I'm going into a trip that I will just stop at Miami airport, but not going into USA borders. My Italian passport is expired, can I comprove my ESTA with my Brazilian passport or do I need to get a visa?
No, that won't work. You can get a new Italian passport and reapply for ESTA, or you can apply for a US visa on your Brazilian passport. But you can't enter the US (which you'll need to do even just for a stopover; the US does not have any international transit without passing immigration) on an expired Italian passport— the airline won't even let you board—, and the ESTA only "works" with the passport it was approved against.
Since a US visa will require a $160 fee, an application, financial documents, and a visit to a US Consulate for an interview, I'd recommend renewing your Italian passport if possible.
An ESTA approval is specific to the passport, not just the person, so a different passport requires a different ESTA. And you can't get an ESTA for a Brazilian passport because Brazil isn't a member of the US Visa Waiver Program.
An expired passport definetly wont work in the USA. And your ESTA wont work with your brazilian nationality. Anyway, unless you have to go to the public area of Miami airport, if you are just at the boarding area, (you dont have to do inmigrations). So, you shouldnt have any trouble.