Yes, you should have lounge access at AGP.
As a Flying Blue Platinum, you’re SkyTeam Elite Plus. That gives you lounge access on any same-day SkyTeam flight, including domestic ones, as long as you’re flying a SkyTeam airline (or partner like Air Europa).
A few clarifications that usually cause confusion:
It does not need to be an international flight
It does not matter that your long-haul is the next morning
What matters is that you’re flying SkyTeam that day and hold Elite Plus
So for AGP–MAD on Air Europa at 18:00, you should be able to access the SkyTeam/partner lounge in Malaga by showing:
Your boarding pass
Your Flying Blue Platinum status
Worst case, sometimes lounge agents get confused with domestic flights, but policy-wise you’re entitled.
Your overnight gap in Madrid doesn’t affect AGP lounge access at all.