The aluminum rub rail could be prepped & painted like any aluminum part I suppose. Have to be sure you don't get too much paint where the vinyl insert goes (making pulling the insert from stern to bow even harder) and along the edge of the exposed aluminum where it meets the vinyl (friction when pulling the insert).
Are your end caps aluminum or plated Zamak pot metal?
I don't know how best to prep the pot metal for paint, but again aluminum endcaps prep & paint like aluminum.
I have no idea how it was prepped or how long it's been painted, but my 1st Jet has all the rubrails, endcaps, bow light & hardware painted a deep red & it is all EXCEPTIONALLY well stuck.