I've been to both several times and always off season in Spring or Autumn. I loved both for different reasons. They are very different in terms of size and vibe. My own thoughts/experience:
Rome
-A capital city so MANY more museums to see than Malaga
-We walked everywhere although got the metro train to the Vatican museums because it was quite far from our hotel
-It can get incredibly busy, even in Mar, so you might need to pre-book museum tickets and/or queue
-Can feel very touristy in places and like any city, you need to cautious of touts, pick pockets etc. Yes, this can occur anywhere, but I actually noticed it far more in Rome than in Malaga
-You could be busy every day just seeing museums
-We stayed here and booked into their regular B&B room. The hotel room was fine, but a bit average TBH. After 1 night, they happened to mention that they also had an apartment around the corner and due to it being off season, we could have it for not alot more. It was a 2 or 3 bed apartment, kitchen, plenty of space and we could still eat breakfast in the main hotel. It was fantastic! I'd return to their apartment anytime, their regular hotel rooms, not so much. https://www.hotelcortinaroma.it/
Malaga
-Much smaller than Rome and also easily walkable. More of a town size as opposed to the city that Rome is, but technically, Malaga is a City
-A mix of locals, visiting Spaniards and also foreign tourists but doesn't feels overly touristy
-There used to be a bus direct from the airport for 3euro each which stopped at multiple places in the 'city' and very easy to get
-Several museums to see, the castle Gibralfaro, the long beach promenade to walk along, Picasso museum, the beach and much more.
-1 memorable trip was an easy train journey to Rhonda to see their famous bridge
-Despite what someone up thread said, I find that there is plenty to see/do to keep me busy there, but also allow a quiet day if I want to look around the shops, seafront etc
-I've stayed here once https://www.booking.com/hotel/es/nhmalaga.en-gb.html A hotel with a pool, good facilities but rooms not massive
-I preferred here and stayed here the the rest of my visits https://www.santacruz-apartments.com/index.php?lng=en No pool but its likely too cold in Mar to need one. The apartments I've stayed in have been spacious and well equipment. Its a 1min walk to the mercado de atarazanas market which has all manner of fresh fruit/veg/eggs/meat etc. Also several supermarkets nearby.
Overall, Malaga might feel more manageable in terms of size as you haven't travelled much before but check on tripadvisor and other sites for more info. Have a fabulous time where ever you go.