Both are non-human side-characters from cartoons who can be egoistical and snobby towards the other characters but while usually not showing it they do care about them.
Both have a general interest in the arts & theatrics (Roger formingly being a shut-in would do nothing but watch T.V. all day & when out of the house he likes to play characters known as personas; Squidward loves painting, dancing & music, mostly playing tunes with his clarinet).
Both had met the protags (Spongebob & Stan) due to some unlikely circumstances (The Pineapple crashing down into Squidward's garden & S.B. deciding to live there; Roger crashing on earth and saving Stan's life in Area 51, leading to Roger having to live with the Smiths).
Both usually fail or get laughed at because of their interest (People saying Squidward's a terrible painter & clarinet player; Roger being laughed at by The Smiths for playing his characters/personas).
Both are easily proned to anger & sometimes will be pushed to violence and lash out, sometimes out of petty reasons.
Both had to deal with unlucky circumstances towards society which is why they lash out and act rude towards the main cast (Squidward always being called terrible at his hobbies & interest; Roger's entire species sending him away & lied to him about why they did it).
Both are [usually in Squidward's case] grey and are bald
Both have a lot of gags where they get physically harmed