定语从句修饰名词或者代词。在你的句子中,(that)the most costly and dramatic measure may be painful 的前面没有名词或者代词,而是及物动词know,所以(that)the most costly and dramatic measure may be painful 是宾语从句,其中the most costly and dramatic measure是从句的主语。
I know the most costly and dramatic measure (that)may be painful.你可能把这里的may be painful误认为是定语从句了。如果是定语从句,作主语的关系代词 that 是不能省略的,只有作宾语的关系代词才能省略。