All of the following quotes come from MN 44.
One of the five aggregates is feeling (vedana) or sensations.
It's a mental process.
Perception and feeling are mental. They’re tied up with the mind,
that’s why perception and feeling are mental processes.”
There are 3 types of feeling.
“There are three feelings: pleasant, painful, and neutral feeling.”
“What are these three feelings?”
“Anything felt physically or mentally as pleasant or enjoyable. This
is pleasant feeling. Anything felt physically or mentally as painful
or unpleasant. This is painful feeling. Anything felt physically or
mentally as neither pleasurable nor painful. This is neutral feeling.”
“What is pleasant and what is painful in each of the three feelings?”
“Pleasant feeling is pleasant when it remains and painful when it
perishes. Painful feeling is painful when it remains and pleasant when
it perishes. Neutral feeling is pleasant when there is knowledge, and
painful when there is ignorance.”
The Buddha has discarded identity view or self view.
“It’s when an educated noble disciple has seen the noble ones, and is
skilled and trained in the teaching of the noble ones. They’ve seen
good persons, and are skilled and trained in the teaching of the good
persons. They don’t regard form as self, self as having form, form in
self, or self in form. They don’t regard feeling … perception …
choices … consciousness as self, self as having consciousness,
consciousness in self, or self in consciousness. That’s how identity
view does not come about.”
So, based on your quote, the Buddha experienced painful feelings from the six sense media but it doesn't mean that he clung to them, or had self view associated with them, or suffered from them. These painful feelings did not give rise to aversion or hate (dosa), in the absence of clinging and defilements.
Furthermore, an enlightened being is inclined to seclusion.
“But ma’am, when a mendicant has emerged from the attainment of the
cessation of perception and feeling, what does their mind slant,
slope, and incline to?”
“Their mind slants, slopes, and inclines to seclusion.”
Living arahants having five aggregates still functional but without defilements and clinging is discussed in Iti 44.
And what is the Unbinding property with fuel remaining? There is the
case where a monk is an arahant whose fermentations have ended, who
has reached fulfillment, finished the task, laid down the burden,
attained the true goal, ended the fetter of becoming, and is released
through right gnosis. His five sense faculties still remain and, owing
to their being intact, he is cognizant of the agreeable & the
disagreeable, and is sensitive to pleasure & pain. His ending of
passion, aversion, & delusion is termed the Unbinding property with
fuel remaining.
And what is the Unbinding property with no fuel remaining? There is
the case where a monk is an arahant whose fermentations have ended,
who has reached fulfillment, finished the task, laid down the burden,
attained the true goal, ended the fetter of becoming, and is released
through right gnosis. For him, all that is sensed, being unrelished,
will grow cold right here. This is termed the Unbinding property with
no fuel remaining."
Iti 44