So I went ahead and book directly on Latam's website, for my flight Sao Paulo to Berlin, connecting in Madrid (1 hrs 30 min connection time). This is on one ticket, first leg GRU-MAD is on Latam, second leg MAD-BER is on Iberia. I called LATAM, and asked them if I need to pick up my luggage at MAD, they said yes I do but I can ask again to be sure when I check in at GRU airport counter.
------‐-----------------------------------------------------------------------------