This may be referring to The Magyar Struggle, from Neue Rheinische Zeitung No. 194, January 13, 1849 (emphasis mine):
There is no country in Europe which does not have in some corner or
other one or several ruined fragments of peoples, the remnant of a
former population that was suppressed and held in bondage by the
nation which later became the main vehicle of historical development.
These relics of a nation mercilessly trampled under foot in the course
of history, as Hegel says, these residual fragments of peoples always
become fanatical standard-bearers of counter-revolution and remain so
until their complete extirpation or loss of their national character,
just as their whole existence in general is itself a protest against a
great historical revolution.
Such, in Scotland, are the Gaels, the supporters of the Stuarts from
1640 to 1745.
Such, in France, are the Bretons, the supporters of the Bourbons from
1792 to 1800.
Such, in Spain, are the Basques, the supporters of Don Carlos.
Such, in Austria, are the pan-Slavist Southern Slavs, who are nothing
but the residual fragment of peoples, resulting from an extremely
confused thousand years of development.
Engels wrote quite a bit about Pan-Slavism following the First Pan-Slav Congress (much of it in this same vein), but this is the only explicit reference that I can find in some casual searching that mentions extermination.
As far as Wells goes, I'm guessing the someone from your scribble may have been referring to this line from A Modern Utopia:
There is only one sane and logical thing to be done with a really
inferior race, and that is to exterminate it.
Based on some of the dialog on the talk page for Wells on Wikiquotes...
This quote mine originated with creationist scholar Richard Weikart in
his cunning and dishonest book "From Darwin to Hitler" in which he
attempts to blame Christians mass-murdering Jews on Charles Darwin.
Because Weikart's hoax was popular with creationists, it has been
copied onto many creationist websites. Weikart wrote as follows:
'Ideas about racial extermination were not unique to Germany, but
became very influential elsewhere also. H. G. Wells epitomized an
influential Anglo-American social Darwinist attitude when he stated
that "there is only one sane and logical thing to be done with a
really inferior race, and that is to exterminate it."'
...it seems like this has been repeated in quite a few other secondary sources in a context of advocating genocide. I'll defer judgment of whether this was taken out of context to the reader.