Try this, should work faster than your current query
SELECT
artist.id,
MAX( album.year ) as latest_album_date
FROM
artist
JOIN album ON album.artist_id = artist.id -- JOIN, not LEFT JOIN
JOIN song ON song.album_id = album.id -- Since you have song.title in WHERE clause, it makes no sense to make these as a LEFT JOIN
WHERE
song.title ilike 'The %'
GROUP BY
artist.id
ORDER BY
latest_album_date DESC
limit 25;